You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run into an issue when using trivy config scan on a subfolder. The reported issues appear in the security tab, but the folder/path reference of files inside the repo is not correctly presented.
Example finding:
The expected path should be terraform/01-bootstrap/eks.tf.
The generated sarif file by trivy:
uses URLs relative to terraform/some-module (i.e. main.tf)
uses relative URLs for module invocations like ../modules/other-module/main.tf.
includes the correct uriBaseId
GitHub interprets all these URls relative to the repo root without using uriBaseId.
I am happy to try a workaround, but currently
I can not yet find a way to make trivy generate absolute URLs, which I believe resolves the issue.
Neither can I tell the upload-action that I am using relative URLs in my repo
expected behavior
Either have the upload-action use the uriBaseId of the sarif file, or
have an existing param like checkout_path (or a new param) in the action, to respect and transform relative URLs, so that they correctly appear in the report.
This is a known limitation. Note also the conspicuous absence of uriBaseId from this document. I've added link to this issue in the internal issue in which we're tracking this.
Originally posted by @rofreytag in #2215
I run into an issue when using trivy config scan on a subfolder. The reported issues appear in the security tab, but the folder/path reference of files inside the repo is not correctly presented.
Example finding:
The expected path should be
terraform/01-bootstrap/eks.tf
.The generated sarif file by trivy:
terraform/some-module
(i.e.main.tf
)../modules/other-module/main.tf
.uriBaseId
GitHub interprets all these URls relative to the repo root without using
uriBaseId
.I am happy to try a workaround, but currently
expected behavior
Either have the upload-action use the
uriBaseId
of the sarif file, orhave an existing param like checkout_path (or a new param) in the action, to respect and transform relative URLs, so that they correctly appear in the report.
Example:
Here an excerpt of the generated sarif file that shows the URLs of each finding
and the originalUriBaseId section at the end:
Here is my full workflow file
The text was updated successfully, but these errors were encountered: