Comments (3)
This is related to anchore/grype#1951, as grype appears to be using the syft internal cyclonedxutil
decoder for decoding. ... I may take a shot at PR-ing a fix this evening, let me see if I have enough time.
from syft.
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.
from syft.
OK, that one looks ready for review.
An update on my goal of avoiding sbom generator surprises around cdx spec versions:
- I was incorrect about how the DefaultVersion constant I saw worked. It looks like syft is configured to pick the latest available spec version (for formats for which syft supports "all versions").
- I think grype just unintentionally uses latest (via calling
cyclonedx.NewBOM()
and not using theEncodeVersion
to select a specific output version) to emit. That said, after beginning to get my head around how syft encoding/decoding works, I'd suspect I should take another look at grype to see if I correctly understood the flow -- perhaps grype accepts similar configuration and there is a near-term workaround if you don't want 1.6 (beyond just pinning back). - For those of us concerned with surprises with backwards incompatible spec versions, syft supports configuring a cyclonedx spec either in a syft config file or by passing a "format@specVersion" pair to the output flag (e.g.,
-o [email protected]=some-json-1.5.cdx.json
). In some ways this is the best of both worlds, the defaults encourage lib owners to quickly support newer specVersions, but as a user you can protect yourself by locking down to a version (above issue with grype aside).
from syft.
Related Issues (20)
- Option to set `PackageSupplier` in root of SPDX document generated by CLI HOT 2
- UT TestParseRpmFiles is failing
- Syft Extract dependencies from Package.json in JavaScript Package Cataloger
- Missing dependency relationships between direct dependencies and transient dependencies in NPM packages HOT 2
- Wrong CPEs generated for OpenSSL by dotnet cataloguer HOT 4
- Special characters (tab, newline) in license URL HOT 1
- linter in CI doesn't work as expected HOT 3
- dom4j: Incorrect Goup IDs (Relocation)
- is it possible to disable package scan and use other tasks (metadata, digest, etc) HOT 2
- Support to exclude scope for Maven Projects like compile, runtime, provided or test in Syft
- Remove duplicates in cyclonedx-json format when same bom-ref
- Support fluent-bit 1.7.0 dev, rc
- Support HAProxy dev
- Mysql binary detection version incorrect for 8.0.x
- syft convert: broken link in help - documentation no longer existing
- Support scanning filesystems without building an index HOT 6
- golang remote license search attempts to resolve stdlib modules
- Don't extract tar/tar.gz contents when cataloging
- Adding "Stats" on the scan inside the json
- Dart: Syft incorrectly generates SBOM with version 0.0.0 for SDK dependencies HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syft.