-
Notifications
You must be signed in to change notification settings - Fork 598
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
Incorrect purl for [email protected] results in missed CVE #3623
Comments
I think once V6 lands, having a per-ecosystem package name alias table would be a reasonable solution to handle this type of thing, where the matching processes matches against all name aliases: newer packages we discover should find and include the old alias(es), and older-named packages should find and additionally include the new alias(es). |
The upstream vuln data (GitHub Advisories) should already be accounting for both in the cases where it matters the most. Is there a specific example observed where that isn't the case? I've just reviewed the records and don't see any obvious ones where it is likely to make an impact on vuln matching. The 8.x series is split between the old and new names, anything less than 8 is only in the old namespace and anything newer is only in the new one |
So for the example provided with version 8.0.30, the only relevant one I see is GHSA-m6vm-37g8-gqvh and it has both variations so should result in vulnerabilities being reported |
But yes, grypedb v6 will make this more robust since we'll have a way to alias packages so that both |
Ah, I see the problem here now though, it's that the purl raised up has |
This is just another example of where maven artifact identification based on included metadata can be difficult and having a secondary database of lookups by digest would really improve the quality |
@kzantow , I don't see another way to fix this in syft other than with lookup by digest. We can't use the hardcoded mappings because that is all about mapping a known groupid to the artifactid that syft comes up with and in this case it is the artifactid that is incorrect. Also the 8.x metadata records that are split between the old and new namespaces look the same so you'd have to pick one and be wrong with the others. |
What happened:
Scanning an image with mysql-connect-java.jar results in incorrect purl. This results in missed CVE
wrong purl = pkg:maven/com.mysql/[email protected]
What you expected to happen:
purl = pkg:maven/mysql/[email protected]
Note difference between
https://mvnrepository.com/artifact/mysql/mysql-connector-java
and
https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
The text was updated successfully, but these errors were encountered: