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
Scanning to report SBOM (trivy image --format spdx-json ...) include duplicated app libraries when they're detected during analysis twice (e.g. it was both detected with "jar" analyzer and "sbom" analyzer).
Desired Behavior
Libraries shouldn't be included twice in the SPDX output.
Actual Behavior
Libraries are duplicated when scanning certain images.
Reproduction Steps
Run trivy image --format spdx-json --output sbom.json bitnami/postgresql:15.5.0-debian-11-r21
Discussed in #6204
Originally posted by juan131 February 26, 2024
Description
Scanning to report SBOM (
trivy image --format spdx-json ...
) include duplicated app libraries when they're detected during analysis twice (e.g. it was both detected with "jar" analyzer and "sbom" analyzer).Desired Behavior
Libraries shouldn't be included twice in the SPDX output.
Actual Behavior
Libraries are duplicated when scanning certain images.
Reproduction Steps
trivy image --format spdx-json --output sbom.json bitnami/postgresql:15.5.0-debian-11-r21
sbom.json
(e.g. execute:cat sbom.json | jq -r '.packages[] | select(.name == "org.postgresql:pljava")'
) to find duplicatesThe library is detected twice due to the "jar" analyzer + the "bitnami" analyzer based on the
.spdx-postgresql.spdx
included in the container image.Target
Container Image
Scanner
None
Output Format
SPDX
Mode
Standalone
Debug Output
Operating System
macOS sonoma
Version
Checklist
trivy image --reset
The text was updated successfully, but these errors were encountered: