You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grype reports a Vulnerability for colors when the package in the SBOM is @colors/colors. The SBOM is a demo sbom from the cyclonedx-node-npm project. juice-shop example.
This appears to be caused by Grype ignoring the group entry in the SBOM as the NPM scope is stored in group parameter.
✔ Vulnerability DB [no update available]
✔ Scanned for vulnerabilities [52 vulnerability matches]
├── by severity: 12 critical, 13 high, 26 medium, 1 low, 0 negligible
└── by status: 44 fixed, 8 not-fixed, 0 ignored
[0001] WARN merging packages have with different pURLs: "bb5ff84367124522"="pkg:npm/%40types/[email protected]#types/cookie" vs "bb5ff84367124522"="pkg:npm/[email protected]"
[0001] WARN merging packages have with different pURLs: "235cdbe593f0b054"="pkg:npm/%40types/[email protected]" vs "235cdbe593f0b054"="pkg:npm/[email protected]"
[0001] WARN some package(s) are missing CPEs. This may result in missing vulnerabilities. You may autogenerate these using: --add-cpes-if-none
NAME INSTALLED FIXED-IN TYPE VULNERABILITY SEVERITY
base64url 0.0.6 3.0.0 npm GHSA-rvg8-pwq2-xj7q Medium
colors 1.5.0 npm GHSA-gh88-3pxp-6fm8 High
...(excluded for readability)
I would expect Grype to identify the package as @colors/colors and provide vulnerabilities for this package. If I manually prepend the group field to the name Grype no longer reports GHSA-gh88-3pxp-6fm8.
How to reproduce it (as minimally and precisely as possible):
Hi @lmco-seth, thanks for the report! It looks like we probably need to improve the CycloneDX importer to handle this case. We will put this in our backlog for a fix.
What happened:
Grype reports a Vulnerability for
colors
when the package in the SBOM is@colors/colors
. The SBOM is a demo sbom from the cyclonedx-node-npm project. juice-shop example.This appears to be caused by Grype ignoring the
group
entry in the SBOM as the NPMscope
is stored ingroup
parameter.Running
grype --output table <demo-bom.json>
produces --GHSA-gh88-3pxp-6fm8 is for colors not @colors/colors
What you expected to happen:
I would expect Grype to identify the package as @colors/colors and provide vulnerabilities for this package. If I manually prepend the
group
field to thename
Grype no longer reportsGHSA-gh88-3pxp-6fm8
.How to reproduce it (as minimally and precisely as possible):
grype --output table <demo-bom.json>
colors
in the vulnerabilities"name": "colors"
to"name": "@colors/colors"
grype --output table <demo-bom.json>
colors
Anything else we need to know?:
This format from the cyclonedx demo appears to the be the intended format by the CycloneDX spec and is supported by the PURL spec.
Environment:
grype version
:cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: