The CVE monitor asked only OSV, so Yocto recipes, header-detected embedded
libraries and the CODESYS runtime were re-matched in NVD only by a scan.
A new NVD pass (pipeline/nvd_monitor.rs) reads NVD's lastMod listing
(lastModStartDate/lastModEndDate, windows of at most 120 days, 500 CVEs per
page, one listing for all tenants) and matches the changed CVEs locally with
the scan's rules (virtualMatchString semantics, marker, version range).
- Cursor in the admin DB (done_until + open window/startIndex/total): a run
stopped by its 10-minute budget, an NVD or a database error continues
there; a listing that shrinks while paged is re-read from earlier.
- Paced with nvd_cpe::request_interval (0.6 s with NVD_API_KEY, 6 s
without), reusing the nvd_cpe client (fetch with retries, factored out).
- Matches become the scan's CveAlert (purl, cvss, repo_id), stored with
$setOnInsert on (cve_id, repo_id) (vex_lifecycle::store_monitored, now
shared with the OSV pass), VEX attached, notify_new_cves, and CVE issues
for new alerts via the shared CveIssueSync (incomplete: closes nothing).
- One INFO line per tenant with counts; NVD_MONITOR=off turns it off
(default on).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p