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

Improve support for the Component.Evidence.Identity field in CycloneDX 1.6 #192

Open
darioandre opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working spec/1.6

Comments

@darioandre
Copy link

In CycloneDX 1.5, the Component.Evidence.Identity field was specified as a single Identity object. In CycloneDX 1.6 this has been deprecated in favor of an array of Identity objects.
The specifications can be compared here:
1.5: https://cyclonedx.org/docs/1.5/json/#components_items_evidence_identity
1.6: https://cyclonedx.org/docs/1.6/json/#components_items_evidence_identity

cyclonedx-go still defines Identity as *EvidenceIdentity so it fails to unmarshal SBOMs which have an array of identities in place of a single one; the error is: cannot unmarshal array into Go struct field Evidence.components.evidence.identity of type cyclonedx.EvidenceIdentity.

This currently happens with some SBOMs generated by cdxgen (https://github.com/CycloneDX/cdxgen) when using the --spec-version 1.6 argument. This is an SBOM affected by the issue. It was generated from a skeleton Poetry project, with just pytest added, using this command:

docker run --rm -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen -r /app -o /app/bom.json --spec-version 1.6`
@nscuro nscuro added bug Something isn't working spec/1.6 labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spec/1.6
Projects
None yet
Development

No branches or pull requests

2 participants