feat(vex): what a supplier states about its component's vulnerabilities (#1025) #1032

Merged
sharang merged 1 commits from feat/supplier-vex into main 2026-11-16 23:09:28 +00:00
Owner

The third part of #1025 (epic #1029): what a supplier states about its component's vulnerabilities. It builds on #1031, which is merged.

What changes

  • Read: CycloneDX vulnerabilities[] from a supplier SBOM, JSON and XML.

    • The analysis gives state, justification, detail and response.
    • affects[].ref matches components by bom-ref.
    • Output: one statement per vulnerability and component. Unknown states, entries without an analysis, and refs that name no component are left out. SPDX 2 carries no VEX.
  • Stored: in a field of its own on the alert, supplier_vex (SupplierVex). It holds the mapped OpenVEX status, the supplier's original state and justification, the detail, the response and the SBOM it came from.

    • The field is not alert.vex. status_of, the OpenVEX, CycloneDX and CSAF exports, notifications and tracker issues never read it. It settles nothing and is never stated as the manufacturer's own; a test checks this.
  • Each scan restates it. After matching, the scan attaches each statement to the alert of the same vulnerability (its id or an alias) and the same component (purl, else name and version). A statement the supplier no longer makes goes: upsert_reported unsets it.

  • State mapping:

    CycloneDX state OpenVEX status
    resolved fixed
    exploitable affected
    in_triage under_investigation
    not_affected, false_positive not_affected
  • Docs: the supplier SBOM section of the SBOM guide explains it.

Not here

  • Display: the dashboard showing the supplier's statement beside the alert needs a mockup. The API returns it in the alert JSON.
  • A standalone VEX: a CycloneDX document from the supplier with only vulnerabilities and no components is still refused as an SBOM without components. A separate upload for supplier VEX is possible later.
  • Overlap with #1015: both touch models/vex.rs and models/cve.rs, so whichever merges second needs a small rebase.

Checks

  • cargo fmt --check passes, and clippy passes with the CI flags for core, agent, dashboard (server and web) and MCP.
  • Agent: 1096 unit tests pass. New tests cover:
    • statements read per component from JSON, and the XML equivalent
    • attaching by alias and purl, and by name and version
    • a stale statement that goes
    • nothing settled
  • Every integration test binary passes against Mongo 7, including a new vex_lifecycle test: stored beside vex, settles nothing, and gone on the next scan without it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

The third part of #1025 (epic #1029): what a supplier states about its component's vulnerabilities. It builds on #1031, which is merged. ## What changes - **Read:** CycloneDX `vulnerabilities[]` from a supplier SBOM, JSON and XML. - The `analysis` gives `state`, `justification`, `detail` and `response`. - `affects[].ref` matches components by `bom-ref`. - Output: one statement per vulnerability and component. Unknown states, entries without an analysis, and refs that name no component are left out. SPDX 2 carries no VEX. - **Stored:** in a field of its own on the alert, `supplier_vex` (`SupplierVex`). It holds the mapped OpenVEX status, the supplier's original state and justification, the detail, the response and the SBOM it came from. - The field is **not `alert.vex`**. `status_of`, the OpenVEX, CycloneDX and CSAF exports, notifications and tracker issues never read it. It settles nothing and is never stated as the manufacturer's own; a test checks this. - **Each scan restates it.** After matching, the scan attaches each statement to the alert of the same vulnerability (its id or an alias) and the same component (purl, else name and version). A statement the supplier no longer makes goes: `upsert_reported` unsets it. - **State mapping:** | CycloneDX state | OpenVEX status | |---|---| | `resolved` | `fixed` | | `exploitable` | `affected` | | `in_triage` | `under_investigation` | | `not_affected`, `false_positive` | `not_affected` | - Docs: the supplier SBOM section of the SBOM guide explains it. ## Not here - **Display:** the dashboard showing the supplier's statement beside the alert needs a mockup. The API returns it in the alert JSON. - **A standalone VEX:** a CycloneDX document from the supplier with only `vulnerabilities` and no components is still refused as an SBOM without components. A separate upload for supplier VEX is possible later. - **Overlap with #1015:** both touch `models/vex.rs` and `models/cve.rs`, so whichever merges second needs a small rebase. ## Checks - `cargo fmt --check` passes, and clippy passes with the CI flags for core, agent, dashboard (server and web) and MCP. - Agent: 1096 unit tests pass. New tests cover: - statements read per component from JSON, and the XML equivalent - attaching by alias and purl, and by name and version - a stale statement that goes - nothing settled - Every integration test binary passes against Mongo 7, including a new `vex_lifecycle` test: stored beside `vex`, settles nothing, and gone on the next scan without it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 22:46:51 +00:00
feat(vex): what a supplier states about its component's vulnerabilities (#1025)
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 / Agent integration (pull_request) Successful in 4m4s
CI / Check (pull_request) Successful in 21m50s
c42c1ff262
A supplier's CycloneDX SBOM can carry its VEX: `vulnerabilities[]` with
an `analysis` (state, justification, detail, response) and `affects`
naming components by `bom-ref`. It is now read, from JSON and XML, per
vulnerability and component.

It goes into a field of its own on the alert, `supplier_vex`, never into
`alert.vex`: the supplier's statement is shown beside the manufacturer's
own, but status_of, the exports, notifications and the tracker issues
never read it, so it settles nothing and is never stated as the
manufacturer's. Each scan restates it from the current SBOM and matches
it to the alert of the same vulnerability (its id or an alias) and
component (purl, else name and version); a statement the supplier no
longer makes goes (`upsert_reported` unsets it).

CycloneDX states map to OpenVEX statuses (resolved -> fixed,
exploitable -> affected, in_triage -> under_investigation, not_affected
and false_positive -> not_affected); unknown states, statements without
an analysis and refs naming no component are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang force-pushed feat/supplier-vex from 98c67c4411 to c42c1ff262 2026-11-16 22:46:51 +00:00 Compare
sharang merged commit af76e516a1 into main 2026-11-16 23:09:28 +00:00
sharang deleted branch feat/supplier-vex 2026-11-16 23:09:28 +00:00
Sign in to join this conversation.