diff --git a/support/scripts/cve-check b/support/scripts/cve-check index a72547ab38..ff14e4b238 100755 --- a/support/scripts/cve-check +++ b/support/scripts/cve-check @@ -271,10 +271,13 @@ def enrich_vulnerabilities(nvd_path: Path, sbom): if vuln_id is None or not vuln_id.upper().startswith("CVE-"): continue - cve = cvecheck.CVE.read_nvd_entry(nvd_path, vuln["id"]) + cve = cvecheck.CVE.read_nvd_entry(nvd_path, vuln_id) + + if cve is None: + print(f"Warning: '{vuln_id}' doesn't exist in NVD database.", file=sys.stderr) + continue vulnerability = nvd_cve_to_cdx_vulnerability(cve.nvd_cve) - vuln_append_or_update_affects_if_exists(vulnerabilities, vulnerability)