feat(cve): the daily monitor re-checks NVD/CPE-only components incrementally (#558)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m19s
CI / Deploy Agent (push) Successful in 9m5s

This commit was merged in pull request #558.
This commit is contained in:
sharang committed 2026-10-09 18:19:19 +00:00
1 parent ba499d14e4
commit 57b5aaeb97
12 files changed
+1772 -117

No files matched your search

+2 -2
View File
@@ -199,7 +199,7 @@ to the SBOM with the package source `embedded` and matched against NVD by CPE.
Prüfwerk matches every SBOM component directly against two public vulnerability sources (no separate scanner binary):
- [OSV.dev](https://osv.dev/) -- batch queried by package URL (purl) for ecosystem advisories (npm, PyPI, crates.io, Go, Maven, ...)
- [NVD](https://nvd.nist.gov/) -- queried per CVE for the CVSS v3.1 base score, and by CPE for components outside a package ecosystem: the CODESYS runtime found in PLC projects and the embedded libraries above. All CVEs of the product are fetched and their affected version ranges compared with the version in use.
- [NVD](https://nvd.nist.gov/) -- queried per CVE for the CVSS v3.1 base score, and by CPE for components outside a package ecosystem: the CODESYS runtime found in PLC projects and the embedded libraries above, and the Yocto recipes. All CVEs of the product are fetched and their affected version ranges compared with the version in use. Between scans the CVE monitor asks NVD only for the CVEs changed since its last run (one time-window listing for all tenants, resumed where a run stopped) and matches them against the same components with the same rules.
Matches are stored as CVE alerts with CVSS scores and re-checked daily, so newly published CVEs against an unchanged dependency still raise a notification.
@@ -400,7 +400,7 @@ Every connection the agent opens, in one place. **Guarded** means: the HTTP clie
| Destination | What is sent | Module | Guard | Limits | Switch |
|---|---|---|---|---|---|
| `api.osv.dev` (`/v1/querybatch`, `/v1/vulns/{id}`) | purls of SBOM components, advisory ids | `pipeline/cve.rs` | guarded | 10 s per request, 5 s connect, body ≤ 16 MiB, 8 advisory reads at once | none (CVE stage) |
| `services.nvd.nist.gov` (`/rest/json/cves/2.0`) | CVE ids (CVSS score), CPE product prefixes (CODESYS, embedded libraries) | `pipeline/cve.rs`, `pipeline/nvd_cpe.rs` | guarded | 30 s per request, 5 s connect, body ≤ 16 MiB, 3 retries after 6/12/24 s, answers cached 6 h | `NVD_API_KEY` (optional, raises NVD's rate limit) |
| `services.nvd.nist.gov` (`/rest/json/cves/2.0`) | CVE ids (CVSS score), CPE product prefixes (CODESYS, embedded libraries, Yocto recipes); for the CVE monitor a time window (`lastModStartDate`/`lastModEndDate`, at most 120 days, 500 CVEs per page) | `pipeline/cve.rs`, `pipeline/nvd_cpe.rs`, `pipeline/nvd_monitor.rs` | guarded | 30 s per request, 5 s connect, body ≤ 16 MiB, 3 retries after 6/12/24 s, answers cached 6 h; the monitor paced to 0.6 s (key) / 6 s apart, 10 min per run, resumed by the next run | `NVD_API_KEY` (optional, raises NVD's rate limit); `NVD_MONITOR=off` stops the monitor's NVD pass |
| `raw.githubusercontent.com` (`/cisagov/kev-data/develop/known_exploited_vulnerabilities.json`), else `www.cisa.gov` (`/sites/default/files/feeds/known_exploited_vulnerabilities.json`) | nothing (a GET of the public KEV catalog) | `pipeline/cve_enrichment.rs` | guarded | 10 s per request, 5 s connect, body ≤ 16 MiB; at most once a day (cached for all tenants) | `CVE_EXPLOIT_LOOKUP=false` |
| `api.first.org` (`/data/v1/epss`) | CVE ids of the alerts | `pipeline/cve_enrichment.rs` | guarded | as above, 50 CVE ids per request, 500 uncached CVEs and 2 min per scan; answers cached a day per source (EPSS and Vulnrichment apart, so one that fails is asked again alone) | `CVE_EXPLOIT_LOOKUP=false` |
| `raw.githubusercontent.com` (`/cisagov/vulnrichment/develop/…`) | CVE ids of the alerts (in the path) | `pipeline/cve_enrichment.rs` | guarded | as above, 8 at once | `CVE_EXPLOIT_LOOKUP=false` |