Skip to content

Commit

Permalink
fix: skip cves missing in mapping
Browse files Browse the repository at this point in the history
RHINENG-12773
  • Loading branch information
psegedy authored and jdobes committed Sep 24, 2024
1 parent 12b4ac2 commit bfc8561
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions vmaas/vulnerabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ func evaluateUnpatchedCves(c *Cache, products []ProductsPackage, cves *Vulnerabi
cn := CpeIDNameID{CpeID: product.CpeID, NameID: product.PackageNameID}
csafCves := c.CSAFCVEs[cn][product]
for _, cveID := range csafCves.Unfixed {
cve := c.CveNames[int(cveID)]
cve, ok := c.CveNames[int(cveID)]
if !ok {
utils.LogWarn("cve_id", cveID, "Missing cve_id to name mapping, CVE might be removed by ProdSec")
continue
}
cpe := c.CpeID2Label[product.CpeID]
if module.Module != "" {
updateCves(cves.UnpatchedCves, cve, pp.Package, nil, cpe, &module)
Expand All @@ -204,7 +208,11 @@ func evaluateManualCves(c *Cache, products []ProductsPackage, cves *Vulnerabilit
cn := CpeIDNameID{CpeID: product.CpeID, NameID: pp.Package.NameID}
csafCves := c.CSAFCVEs[cn][product]
for _, cveID := range csafCves.Fixed {
cve := c.CveNames[int(cveID)]
cve, ok := c.CveNames[int(cveID)]
if !ok {
utils.LogWarn("cve_id", cveID, "Missing cve_id to name mapping, CVE might be removed by ProdSec")
continue
}
_, inCves := cves.Cves[cve]
_, inUnpatchedCves := cves.UnpatchedCves[cve]
if !(inCves || inUnpatchedCves) {
Expand Down

0 comments on commit bfc8561

Please sign in to comment.