Skip to content

Commit

Permalink
fix(apk): find secdb entries for origin packages
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Luhring <[email protected]>
  • Loading branch information
luhring committed Jan 24, 2024
1 parent 636248d commit 8ab6e16
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions grype/matcher/apk/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ func (m *Matcher) cpeMatchesWithoutSecDBFixes(store vulnerability.Provider, d *d
if err != nil {
return nil, err
}
for _, upstreamPkg := range pkg.UpstreamPackages(p) {
secDBVulnerabilitiesForUpstream, err := store.GetByDistro(d, upstreamPkg)
if err != nil {
return nil, err
}
secDBVulnerabilities = append(secDBVulnerabilities, secDBVulnerabilitiesForUpstream...)
}

secDBVulnerabilitiesByID := vulnerabilitiesByID(secDBVulnerabilities)

Expand Down

0 comments on commit 8ab6e16

Please sign in to comment.