Replies: 1 comment
-
|
Hello @kidmose We use official CycloneDX library. They already have issue and PR for this problem: I asked them about this, so we will wait their answer. |
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
First off; Thanks for providing an awesome tool! :)
I've been using docker image
cyclonedx/cyclonedx-clito convert my CycloneDX XML SBOM into CycloneDX JSON and the checking it withaquasec/trivyfor known vulnerabilities, as part of my gitlab pipelines.This started failing recently, where
trivyfails (cyclonedx-cliruns with no errors, producing an JSON SBOM):Comparing an old JSON SBOM that trivy analysed successfully, with a recent one that fails, I found that the only change (except timestamps) was that the key
metadata.component.datawas introduced (with[]as value) together withcomponents.[].datafor each referenced component (also with[]as the value for every single entry).This coincides roughly with the
cyclonedx/cyclonedx-cli:0.28.0(and the first few path versions) being released and replacing latest.Pinning to
cyclonedx/cyclonedx-cli:0:27:0fixed the problem for meI found this commit on
cyclonedx-clithat seems to be where the problem was introduced;datais introduced into what appears to be test data, and the reordering of keys in output (tags) also aligns with my diff of "good" and "bad" json inputs for trivy.My conclusion is that it appears that trivy is not able to handle json generated according to v9.0.0 of the CycloneDX.Utils library that
cyclonedx-clihas switched to with version 0.28.0.From the specification I understand that the
Component.metadata.component.datakey should point to an array. I see nothing indicating that it must not be empty.Is this a bug in trivy?
Desired Behavior
No error, SBOM analysed.
Actual Behavior
Reproduction Steps
Target
SBOM
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
not doneOperating System
docker
Version
.Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions