fix(vex): CVE is the primary vulnerability id in VEX, CSAF and CycloneDX, GHSA an alias #542

Merged
sharang merged 1 commits from fix/vex-cve-primary-id into main 2026-10-09 13:22:06 +00:00
Owner

ENISA and BSI work with CVE ids. OpenVEX and the CycloneDX VEX named a vulnerability by the id its alert was found under, so a GitHub advisory showed up as GHSA-… even when its CVE was known.

Changes

  • OpenVEX: vulnerability.name = CVE, GHSA (and other ids) in aliases.
  • CycloneDX VEX + CycloneDX SBOM: id = CVE with source NVD (+ URL); the GHSA is in references (source GitHub Security Advisories). VulnRef gets aliases (serde default, filled from OSV details) so the SBOM export can resolve the CVE. In the SBOM, vulnerabilities now merge by CVE across scanners (OSV GHSA and NVD CVE are a single entry).
  • CSAF: was already keyed on the CVE. ids[].system_name is now "GitHub Security Advisories" instead of "GHSA".
  • Dedup: alerts of one CVE in one component (GHSA alert + CVE alert) produce one statement in OpenVEX, CycloneDX and CSAF. The status comes from the alert with an explicit statement (latest wins), otherwise from an open alert, otherwise from the first. Before this change CSAF could list one product under two statuses.
  • GHSA only (no CVE known): unchanged, the advisory id stays the id.
  • One strict is_cve / primary_id / advisory_source in compliance-core::models::cve replaces the copies in csaf_docs and cve_enrichment. CveAlert::cve() now uses the strict check.
  • Storage is unchanged: VEX statements are set by alert _id, and the lifecycle filters on the stored cve_id.
  • Docs: docs/guide/vex.md, vex-en.md, sbom.md.

Tests

  • New: the_cve_is_the_vulnerability_id_and_the_github_advisory_an_alias (CVE+GHSA, CVE only, GHSA only across all three formats), a_cve_found_as_cve_and_as_github_advisory_in_one_component_is_one_statement, the_cyclonedx_sbom_lists_a_vulnerability_under_its_cve_once, plus models::cve unit tests. All of them validate against the schemas.
  • Updated: the CSAF test now pins the new system_name.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

ENISA and BSI work with CVE ids. OpenVEX and the CycloneDX VEX named a vulnerability by the id its alert was found under, so a GitHub advisory showed up as `GHSA-…` even when its CVE was known. ## Changes - **OpenVEX**: `vulnerability.name` = CVE, GHSA (and other ids) in `aliases`. - **CycloneDX VEX + CycloneDX SBOM**: `id` = CVE with `source` NVD (+ URL); the GHSA is in `references` (`source` GitHub Security Advisories). `VulnRef` gets `aliases` (serde default, filled from OSV details) so the SBOM export can resolve the CVE. In the SBOM, vulnerabilities now merge by CVE across scanners (OSV GHSA and NVD CVE are a single entry). - **CSAF**: was already keyed on the CVE. `ids[].system_name` is now "GitHub Security Advisories" instead of "GHSA". - **Dedup**: alerts of one CVE in one component (GHSA alert + CVE alert) produce one statement in OpenVEX, CycloneDX and CSAF. The status comes from the alert with an explicit statement (latest wins), otherwise from an open alert, otherwise from the first. Before this change CSAF could list one product under two statuses. - **GHSA only** (no CVE known): unchanged, the advisory id stays the id. - One strict `is_cve` / `primary_id` / `advisory_source` in `compliance-core::models::cve` replaces the copies in `csaf_docs` and `cve_enrichment`. `CveAlert::cve()` now uses the strict check. - Storage is unchanged: VEX statements are set by alert `_id`, and the lifecycle filters on the stored `cve_id`. - Docs: `docs/guide/vex.md`, `vex-en.md`, `sbom.md`. ## Tests - New: `the_cve_is_the_vulnerability_id_and_the_github_advisory_an_alias` (CVE+GHSA, CVE only, GHSA only across all three formats), `a_cve_found_as_cve_and_as_github_advisory_in_one_component_is_one_statement`, `the_cyclonedx_sbom_lists_a_vulnerability_under_its_cve_once`, plus `models::cve` unit tests. All of them validate against the schemas. - Updated: the CSAF test now pins the new `system_name`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-09 13:09:25 +00:00
fix(vex): CVE is the primary vulnerability id in VEX, CSAF and CycloneDX, GHSA an alias
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 11m19s
bc3e5dda99
ENISA and BSI work with CVE ids. OpenVEX and the CycloneDX VEX named a
vulnerability by the id its alert was found under, so a GitHub advisory
appeared as GHSA-... even when its CVE was known.

- OpenVEX: vulnerability.name is the CVE, the GHSA and other ids are aliases.
- CycloneDX VEX and SBOM: id is the CVE with source NVD, the GHSA a reference
  to GitHub Security Advisories. VulnRef now keeps OSV's aliases so the SBOM
  export can do the same.
- CSAF: already keyed on the CVE; ids now name GitHub Security Advisories.
- Alerts of one CVE in one component (GHSA and CVE alerts) are one statement
  in all three VEX formats; an explicit statement wins, then an open alert.
- A vulnerability without a CVE keeps its advisory id as before.
- One strict is_cve in compliance-core replaces the CSAF and enrichment copies.

Stored alerts and VEX statements are unchanged (keyed by alert _id / cve_id).

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