fix(vex): alerts stored before purls get their component's purl #537

Merged
sharang merged 1 commits from fix/a4-purl-migration into main 2026-10-08 22:55:23 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c8c4b46c85 fix(vex): alerts stored before purls get their component's purl
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m43s
#532 stored the purl on new alerts and refreshed it when a scan reported
an alert again. An alert open at the deploy whose component the first
scan after it removed (stage: gson 2.8.8 -> 2.8.9) was resolved without
ever being reported again, and its VEX/CSAF/CDX exports fell back to
pkg:generic.

vex_lifecycle::backfill_purls gives open alerts without a purl the purl
of their component in the stored SBOM (same name, case aside, and
version, as the exports match it). It runs once per tenant at agent start
and before every target scan, while the SBOM still lists the component.
Alerts already resolved with their component gone cannot be backfilled.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-09 00:42:56 +02:00