Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting spdx (obtained via docker-scout) to cyclonedx results in empty file #373

Open
ghost opened this issue Jun 10, 2024 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2024

I'm trying to convert an spdx BOM (obtained via docker-scout) into a cyclone dx file. However, the generated cyclonedx is ~empty! Here's how to reproduce:

  1. Obtain the spdx file: docker-scout sbom --format json quay.io/mongodb/mongodb-community-server:7.0.0-ubi8 > /tmp/input.json
  2. Run the converter: ./cyclonedx-linux-arm64 convert --input-file /tmp/input.json --output-file /tmp/foo.json --output-version v1_5
  3. The output looks like this:
{
  "bomFormat": "CycloneDX",
  "specVersion": "1.5",
  "vulnerabilities": []
}

(It should have a whole lot of info in there!)

I'm hoping that I'm just misunderstanding some basic aspect of how to invoke this tool. Any pointers are appreciated!

cc: @Trevor159

@andreas-hilti
Copy link
Contributor

@stevegrossmongodb Does specifying the input format using --input-format spdxjson help? (The autodetection is not as good as you'd hope for.) If not, are you able to attach the input.json to reproduce it slightly easier?

@ghost
Copy link
Author

ghost commented Jun 15, 2024

We finally got it working with these arguments:

cat input_obtained_from_docker_scout | \
<cyclonedx_bin> \
  convert \
  --output-version 1_5 \
  --input-format spdxjson \
  --output-format json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant