-
Notifications
You must be signed in to change notification settings - Fork 594
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
Grype not reporting vulns on SPDX SBOMs #1672
Comments
Hi @nishakm, I ran Syft on both of these SBOMs for a quick test to see what was going on:
It looks like the SPDX version has the package name as My apologies but I'm not too familiar with the ecosystems here. Do you know how the |
I haven't been able to reproduce this in a general case: ❯ syft -o spdx-json solr:latest > /tmp/solr.latest.spdx.json
...
❯ grype -q solr:latest | wc -l
96
❯ grype -q /tmp/solr.latest.spdx.json| wc -l
96 (I just picked Solr as a random public image that has a fair number of JARs in it.) I think the |
@tgerla The |
@willmurphyscode For SPDX, I used the maven plugin which can either print out the project name or |
This sounds like a good generic add to grype specifically. Where the details are:
Developer note: this should be done fairly early in processing (during the package provider processing) such that CPE generation will take these values into consideration. |
Potentially related: #1701 |
Moved this to ready based on the implementation details suggested by @wagoodman |
What happened:
Grype was able to catch vulnerabilities when given a CycloneDX SBOM but not for an SPDX SBOM reporting the same package/component.
What you expected to happen:
Grype should be able to report vulnerabilities given an SPDX SBOM which it supports (unless I have misunderstood, in which case, please disregard).
How to reproduce it (as minimally and precisely as possible):
I've attached two SBOM formats reporting the same component
json
. Grype reports vuln GHSA-4jq9-2xhw-jpx7 and GHSA-3vqj-43w4-2q58 against this component when parsing the CycloneDX SBOM but not the SPDX SBOM.Anything else we need to know?:
Environment:
grype version
:cat /etc/os-release
or similar): Ubuntu 22.04 LTScomponent_json.cdx.json
package_json.spdx.json
The text was updated successfully, but these errors were encountered: