Cannot navigate to subfolder path
vovikhangcdv opened this issue · 1 comments
vovikhangcdv commented
As I know, the SARIF Viewer only searches the local path from the sarif file root folder, not the workspace folder. It will not work when a sarif view is located as a separated folder from the source code root folder.
I suggest that the path resolve should search from the workspace or vscode windows folder.
Reproduce
- Generate a SARIF file from a source by some SAST tools, such as: CodeQL or Semgrep.
- The folder structural look like:
vscode-workspace/ - sample-source/ - sample-source-results/ + sample-source.sarif
- Open
vscode-folder-root
by VSCode - Click on the Locations in SARIF Viewer
- Text editor will not navigate to the file.
Expection
SARIF Viewer resolves the relative path from the Vscode dir or workspace folder.
vovikhangcdv commented
It could try to recursive loop through the subfolders of the workspace too. It will be more convenient. Of course, it will cost more resources, this could be set to disable by default anyway.