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

fix: allow cyclonedx json input with no components #2127

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

ahoz
Copy link
Contributor

@ahoz ahoz commented Sep 13, 2023

According to cyclonedx json reference the components field is not mandatory.
This can be verified, by generating a cyclonedx json report using https://github.com/CycloneDX/cyclonedx-maven-plugin in a small maven project.

A missing components field will lead to:
error during command execution: failed to decode SBOM: unable to identify format

This fixes the error and still respects this pr.

Signed-off-by: Ahmet Taha Özdemir <me@ahoz.de>
@spiffcs spiffcs merged commit 5035d9c into anchore:main Sep 13, 2023
9 checks passed
@wagoodman wagoodman added the bug Something isn't working label Sep 20, 2023
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Signed-off-by: Ahmet Taha Özdemir <me@ahoz.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants