-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add CycloneDX 1.6 Support #2974
Comments
This is related to anchore/grype#1951, as grype appears to be using the syft internal |
Just a quick note after digging into syft. I now believe I'm incorrect about this being the root issue behind my particular problem. It's very related in the sense that if someone updated the list of supported cyclonedx versions to include 1.6 in syft my problem would go away -- for now ... but the core problem seems to be that grype, when it emits an SBOM is simply calling cyclonedx.NewBOM, which uses the latest available cyclonedx SpecVersion by default, whereas syft (very reasonably, imo!) has their own internal list of default + supported versions. I'd like to fix both problems and not run into the grype problem again when cyclonedx spec 1.7 comes out, so I think I might start over there. |
- Resolves anchore#2974 Signed-off-by: Rajan Agaskar <ragaskar@gmail.com>
- Resolves anchore#2974 - Also add detailed instructions re: updating schemas (necessary when a new CycloneDX spec version becomes available. Signed-off-by: Rajan Agaskar <ragaskar@gmail.com>
- Resolves anchore#2974 - Also add detailed instructions re: updating schemas (necessary when a new CycloneDX spec version becomes available. - The DefaultVersion constant has been updated to "1.6" -- it's not clear to me how this is used at this time (it may be redundant given other code), but effectively unless a specific spec version is configured, `syft` will emit the "most recent" spec version available for cyclonedx. Users who wish to pin back to a "older" specVersion (e.g. to preserve compatibilty with utilities that have not yet bumped to latest) can either set this in a syft config file or pass a name@spec_version pair to the output flag (e.g. `-o cyclonedx-json@1.5=some-1.5-spec-bom.cdx.json`) Signed-off-by: Rajan Agaskar <ragaskar@gmail.com>
- Resolves anchore#2974 - Also add detailed instructions re: updating schemas (a necessary task when a new CycloneDX spec version becomes available). - The DefaultVersion constant has been updated to "1.6" -- it's not clear to me how this is used at this time (it may be redundant given other code), but effectively unless a specific spec version is configured, `syft` will emit the "most recent" spec version available for cyclonedx. Users who wish to pin back to a "older" specVersion (e.g. to preserve compatibilty with utilities that have not yet bumped to latest) can either set this in a syft config file or pass a name@spec_version pair to the output flag (e.g. `-o cyclonedx-json@1.5=some-1.5-spec-bom.cdx.json`) Signed-off-by: Rajan Agaskar <ragaskar@gmail.com>
- Resolves anchore#2974 - Also add detailed instructions re: updating schemas (a necessary task when a new CycloneDX spec version becomes available). - The DefaultVersion constant has been updated to "1.6" -- it's not clear to me how this is used at this time (it may be redundant given other code), but effectively unless a specific spec version is configured, `syft` will emit the "most recent" spec version available for cyclonedx. Users who wish to pin back to a "older" specVersion (e.g. to preserve compatibilty with utilities that have not yet bumped to latest) can either set this in a syft config file or pass a name@spec_version pair to the output flag (e.g. `-o cyclonedx-json@1.5=some-1.5-spec-bom.cdx.json`) - Regenerate relevant .golden files (there seems to be a way to do this via flags, but I couldn't quite figure out the right set to pass correctly, esp. since (as a relative go novice) I found it difficult to run just a single test file. I ended up "brute-forcing it" by changing the *updateSnapshot val to "true" and running it in Goland. A brief comment giving an example of regenerating fixtures usage would be helpful. Signed-off-by: Rajan Agaskar <ragaskar@gmail.com>
OK, that one looks ready for review. An update on my goal of avoiding sbom generator surprises around cdx spec versions:
|
What would you like to be added:
Support for CycloneDX 1.6 Specification.
Why is this needed:
Teams and Tools that leverage Syft as part of the SW supply chain security have a need for the additional fields and to avoid compatibility issues when working with sboms
Additional context:
The underlying go library used for cyclonedx has added support for 1.6 (as of v0.9.0) and is already in use with syft as of this PR.
The text was updated successfully, but these errors were encountered: