Allow specification of SBOM product purl during scan #9381
Closed
lucastheisen
started this conversation in
Ideas
Replies: 1 comment
-
|
Instead of adding |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When scanning an image from a repo, the purl of the product is correct, but if you pull the image first then scan from local build or oci artifact, the product purl is not the same. Because it is not the same, i cannot use that product purl to limit the scope of vex based suppressions.
For example:
According to the vex documentation I have read, you should scope your vex entries by the product you are scanning. In this case it would be something like:
{ "@context": "https://openvex.dev/ns/v0.2.0", "@id": "https://openvex.dev/docs/public/vex-8b795986b87d39e5b6b6ddbd5e9ff049548c6f83065343b3bcd6024b19933404", "author": "A U Thor", "timestamp": "2025-08-20T12:22:10.235400227-04:00", "last_updated": "2025-08-22T11:29:56.020110317-04:00", "version": 9, "statements": [ { "vulnerability": { "name": "CVE-2025-47907" }, "timestamp": "2025-08-22T11:29:56.020112317-04:00", "products": [ { "@id": "pkg:oci/hello-world?repository_url=index.docker.io%2Flibrary%2Fhello-world" "subcomponents": [ { "@id": "..." } ] } ], "status": "not_affected", "justification": "vulnerable_code_not_in_execute_path", "impact_statement": "this is an example" } ] }The first scan that uses the repo url would properly find the subcomponent, but the second scan would not because it thinks its ref/bom-ref are the uuid of the build and not the actual name it would be pushed to. In theory the image could get pushed then the scan run on the place it is pushed to, but that requires unnecessary network traffic and would mean the image is put in place prior to being scanned (which would be a security risk).
If there was a way to simply state
--product-id "pkg:oci/hello-world?repository_url=index.docker.io%2Flibrary%2Fhello-world"as an option to thetrivycommand it would resolve this issue.Target
None
Scanner
Vulnerability
Beta Was this translation helpful? Give feedback.
All reactions