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

Deduplicate vulnerabilities for SUSE linux #1918

Open
wagoodman opened this issue Jun 6, 2024 · 0 comments
Open

Deduplicate vulnerabilities for SUSE linux #1918

wagoodman opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wagoodman
Copy link
Contributor

Today we have a function that checks if the distro package in question is from a "comprehensive feed", such that is can be used to deduplicate matches from non-distro sources (such as pypi).

grype/grype/pkg/package.go

Lines 152 to 174 in e5b341b

func distroFeedIsComprehensive(distro *linux.Release) bool {
// TODO: this mechanism should be re-examined once https://github.com/anchore/grype/issues/1426
// is addressed
if distro == nil {
return false
}
if distro.ID == "amzn" {
// AmazonLinux shows "like rhel" but is not an rhel clone
// and does not have an exhaustive vulnerability feed.
return false
}
for _, d := range comprehensiveDistros {
if strings.EqualFold(d, distro.ID) {
return true
}
for _, n := range distro.IDLike {
if strings.EqualFold(d, n) {
return true
}
}
}
return false
}

SUSE is not on this list which is leading to multiple false positives:

To be able to add SUSE to the list of distros that are considered comprehensive (thus we can deduplicate the matches for), we need to enhance the vunnel provider. Today we parse the patch information but additionally need to parse the -affected files such there is a hope to find matches for entries that have no fixes upstream.

I'm writing this issue here so that, when the vunnel enhancement lands, we can add a specific test for it here in grype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant