fix(plc): CVE alerts of PLC targets resolve, their issues sync #519

Merged
sharang merged 1 commits from fix/plc-cve-lifecycle into main 2026-10-06 16:13:59 +00:00
Owner

A standalone fix found while planning #515, as its own PR so it can be tested and reverted on its own.

Bug

For PLC targets, persist_control_app_sbom stores the CVE alerts of the CODESYS runtime and libraries. It never does what the code pipeline does at its end: resolve_gone and sync_cve_issues. So:

  • a CVE of a runtime or library version the project no longer references stays open for good, with no fixed VEX status;
  • a PLC project in a managed Git repository never gets CVE issues, and never has them closed.

Fix

  • The PLC path records whether its lookups were complete. Any of these makes it incomplete:
    • OSV left components unchecked, failed or timed out;
    • the CODESYS NVD match left components unchecked or timed out.
  • Then it calls resolve_gone(target_id, alerts, complete). PLC targets return before the code pipeline, so these are all of the target's alerts. An incomplete lookup resolves nothing.
  • With a code artifact (a managed Git repository), sync_cve_issues follows, as for code targets.
  • An empty PLC SBOM still returns early. That's unchanged: an unreadable archive must not resolve everything.

Tests

  • resolve_gone and the issue sync are already covered (vex_lifecycle, cve_issues). This change wires them into the PLC path, which needs live OSV/NVD. The end-to-end check is test plan check 34.
  • clippy -D warnings for the agent.

Docs: the PLC guide. Stage only; no tag.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

A standalone fix found while planning #515, as its own PR so it can be tested and reverted on its own. ## Bug For PLC targets, `persist_control_app_sbom` stores the CVE alerts of the CODESYS runtime and libraries. It never does what the code pipeline does at its end: `resolve_gone` and `sync_cve_issues`. So: - a CVE of a runtime or library version the project no longer references stays open for good, with no `fixed` VEX status; - a PLC project in a managed Git repository never gets CVE issues, and never has them closed. ## Fix - The PLC path records whether its lookups were **complete**. Any of these makes it incomplete: - OSV left components unchecked, failed or timed out; - the CODESYS NVD match left components unchecked or timed out. - Then it calls `resolve_gone(target_id, alerts, complete)`. PLC targets return before the code pipeline, so these are all of the target's alerts. An incomplete lookup resolves nothing. - With a code artifact (a managed Git repository), `sync_cve_issues` follows, as for code targets. - An empty PLC SBOM still returns early. That's unchanged: an unreadable archive must not resolve everything. ## Tests - `resolve_gone` and the issue sync are already covered (`vex_lifecycle`, `cve_issues`). This change wires them into the PLC path, which needs live OSV/NVD. The end-to-end check is test plan check 34. - clippy `-D warnings` for the agent. Docs: the PLC guide. Stage only; no tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-06 16:01:22 +00:00
fix(plc): CVE alerts of PLC targets resolve, their issues sync
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 10m5s
bf0a19c86b
persist_control_app_sbom stored a PLC target's CVE alerts but never did what
the code pipeline does at its end: resolve_gone and sync_cve_issues. So a
CVE of a CODESYS runtime or library the project no longer references stayed
open for good, and a PLC project in a managed repository never got CVE
issues.

- The PLC path tracks whether its lookups were complete (OSV without
  unchecked components or failure/timeout, the CODESYS NVD match without
  unchecked or timeout) and then calls resolve_gone with the target's
  alerts (PLC targets run only this path, so these are all its alerts).
- With a code artifact (managed git), sync_cve_issues follows, as for code.
- Docs (PLC guide), test plan check 34.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit dc9ca8dcd8 into main 2026-10-06 16:13:59 +00:00
Sign in to join this conversation.