Skip to content
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

Remove PackageSearchNames from VulnerabilityProvider #2455

Open
kzantow opened this issue Feb 18, 2025 · 0 comments
Open

Remove PackageSearchNames from VulnerabilityProvider #2455

kzantow opened this issue Feb 18, 2025 · 0 comments
Milestone

Comments

@kzantow
Copy link
Contributor

kzantow commented Feb 18, 2025

A PackageSearchNames function was added to the VulnerabilityProvider interface here. This function is due to the fact that Java (and maybe other) packages have names in the v6 database stored in the form: <group-id>:<package-name> and there needs to be some way to match this appropriately.

It is my feeling that what we should be doing is pushing as much to the matchers as possible, in order to make the matching process as clear as possible. One potential solution to this is to add a GroupName criteria, which the Java matcher knows about and adds to the FindVulnerabilities call, and the v6 VulnerabilityProvider knows, if there's a GroupName and a PackageName, it should concatenate these to form the correct string to search with. By forcing the matchers to concatenate these to form PackageNames, it is less flexible in the future if, for example, the group name is separated to its own column. By providing the criteria separately, it would allow the VP to do the right thing, respective to its data regardless of how it's stored.

@kzantow kzantow added this to the Grype 1.0 milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant