microsoft / sarif-azuredevops-extension

MIT License
9 stars 4 forks source link

Wrong paths for files in scan results with multi-checkouts. #23

Open wooch82 opened 11 months ago

wooch82 commented 11 months ago

Regarding documentation each repo is checked out to a custom path $(Pipeline.Workspace)/s/RepoName if use multi-checkouts. In scans result section filenames have wrong links with RepoName

image

so it causes the error I try to see the file in a repo:

image
50Wliu commented 6 months ago

This is tricky. The viewer constructs those URLs from the "version control provenance" object it receives, which (if it doesn't exist) this extension defaults to the repository that the build is linked to, not necessarily the repo that the results are from. So that seems to point to two things that need doing:

  1. This extension needs to figure out if multi-checkout is happening (somewhat difficult).
  2. The viewer needs to have an option to strip portions of the relative URI.