-
Notifications
You must be signed in to change notification settings - Fork 632
Grype false negatives in versions v0.88.0 and later leading to missed critical vulnerabilities #2628
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
Comments
Thanks for the report. I think this is similar to the issue in #2580 where grype seems to not be preoperly considering namespace from the package url when forming package searches |
Just wanted to add a detailed comment here around the WHY this is happening while we work on a fix.
grype/grype/db/v5/vulnerability_provider.go Lines 111 to 118 in 247f5d7
This would return the expected results that were first encountered. Theses results are correct. Currently on grype/grype/matcher/internal/common.go Lines 12 to 26 in 6f48a79
By that point in the code we still have all the package information and could potentially make the correct query to the DB. We eventually get to the v6 vulnerability provider where we call grype/grype/db/v6/vulnerability_provider.go Lines 196 to 351 in 8d756b1
@westonsteimel noticed here how the package name is @wagoodman summed it up nicely here:
@wagoodman also suggested a few places where we could try and fix this:
@kzantow created an issue where we can revist some of the above behavior to make sure we address this inconsistency in result searches with v6: Looks like this has been moved to in progress so expect some kind of fix surrounding the above points to be in the works. |
What happened
I installed two different versions of Grype - v0.87.0 and v0.91.2. I generated a minimalist test SBOM containing vulnerable artifacts. Grype 0.87.0 reports 3 critical and 2 high vulnerabilities whereas any later version (including the latest) does not report anything. This is true for all Grype versions using v6 DB schema.
What you expected to happen
All versions of Grype should produce consistent results and report all vulnerabilities.
How to reproduce it (as minimally and precisely as possible)
I used the following sbom.json file for testing both versions:
Using Grype v0.87.0:
Using Grype v0.91.2:
Anything else we need to know?:
This has been happening since the release of v0.88.0, which made a shift to v6 of the database schema.
Environment:
cat /etc/os-release
or similar): Alpine Linux v3.21.3The text was updated successfully, but these errors were encountered: