"Multiple types of OS packages in SBOM are not supported (["rpm" "deb"])" #6489
Replies: 3 comments 4 replies
-
I saw a similar discussion, however my issue is different. The only packages that match any
Trivy can handle other different libraries, like packages that come from
|
Beta Was this translation helpful? Give feedback.
-
Is there a reason for not supporting multiple OSes? This is a a blocker for us so I'd be interested in contributing an update to resolve this for us and others. Understanding the why behind this restriction would help with understanding the direction we need to go in with the code change. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to ignore or bypass this check? |
Beta Was this translation helpful? Give feedback.
-
Description
We are using cyclonedx
cdxgen
to generate our SBOMs - this is including our code package and any Dockerfiles included there - and using trivy to scan for vulnerabilities using the command:trivy sbom -f json --output software-dependency-findings.json bom.json
Trivy is failing with the error:
2024-04-12T16:39:06.688Z FATAL sbom scan error: scan error: scan failed: failed analysis: SBOM decode error: failed to decode: failed to parse sbom: failed to aggregate packages: multiple types of OS packages in SBOM are not supported (["rpm" "deb"])
Our package includes a Dockerfile that uses
"postgres:14.1-alpine"
who's layers contain a lot of bom-ref references to"bom-ref": "pkg:rpm
and another container who's bom-ref references"purl": "pkg:deb
.Our tool supports many different teams and code bases so it needs to be flexible.
Are there any suggestions on how to go about supporting this package and others like it with trivy? I'm just looking for some guidance on how to navigate this issue.
Desired Behavior
Trivy will work as expected without error
Actual Behavior
Trivy is failing with the error:
2024-04-12T16:39:06.688Z FATAL sbom scan error: scan error: scan failed: failed analysis: SBOM decode error: failed to decode: failed to parse sbom: failed to aggregate packages: multiple types of OS packages in SBOM are not supported (["rpm" "deb"])
Reproduction Steps
1. Run cdxgen to generate an SBOM on a package that includes multiple different container images 2. Run `trivy sbom -f json --output software-dependency-findings.json bom.json` on the generated SBOM file
Target
SBOM
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
Codebuild Ubuntu standard:7.0
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions