Scanning an SBOM doesn't include container layer information, even if the SBOM specifies a type of container #6504
aegarbutt-stripe
started this conversation in
Bugs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When performing a vulnerability scan of a container image, there is additional metadata in the scan results that identifies which layer contributed the vulnerability.
This is a shame since the SBOM itself has this layer information inside of it:
Desired Behavior
When scanning an SBOM created from a container image, continue to report the layer information.
The layer information is intentionally being discarded: https://github.com/aquasecurity/trivy/blob/main/pkg/scanner/scan.go#L171-L174
If I comment out those lines (not necessarily appropriate for general use), the layer information is not discarded.
Actual Behavior
Results from a vulnerability scan of an image:
Results from a vulnerability scan of an SBOM generated from a container image, the layer information is lost.
Reproduction Steps
Target
SBOM
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
Linux
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions