Part 3 of 4 for #498: a target's VEX statements as a CSAF 2.0 VEX advisory (csaf_vex). It is always a draft, for the manufacturer to review and publish.
What
compliance_core::csaf_docs. It builds on the same alerts and statements as the OpenVEX and CycloneDX VEX exports.
Product tree: the target is the product, and each component is default_component_of it, with its purl.
affected becomes known_affected with a remediation carrying the action statement: vendor_fix when a fixed version is known, else mitigation.
not_affected becomes known_not_affected. The justification becomes a flag (CSAF's labels are OpenVEX's justifications) and the impact statement an impact threat.
Each CVE appears once: a GHSA alert whose alias is that CVE merges into it, as CSAF test 6.1.23 requires.
Every vulnerability has notes, as the VEX profile requires (6.1.27.5).
Draft markings: tracking status draft, TLP:AMBER, lang taken from the UI, and the note "Draft, not published: check publisher and statements before release."
Publisher: the workspace. The namespace comes from ?namespace=, which must be an http(s) URL (else 400). Without one, the draft holds the placeholder https://example.invalid/<workspace>.
API:GET /api/v1/targets/{id}/csaf?namespace=&lang=de|en. It shares its data loading with the VEX export.
Evidence pack:csaf-vex.json, with the placeholder namespace.
Dashboard: a web-address field and a "CSAF-Entwurf herunterladen" button in the VEX card.
Docs: DE/EN sections in guide/vex. On publication, the TLP label becomes WHITE or GREEN; CSAF 2.0 uses TLP v1 labels, so "CLEAR" is not available there.
Validation
Schemas: the OASIS CSAF 2.0 schema and FIRST CVSS schemas are vendored from gocsaf v3.6.0 (Apache-2.0 / BSD-3-Clause). vex_schemas validates the advisory against them, with negative controls.
Ignored test (--ignored):
gocsaf csaf_validator (Apache-2.0): schema and file-name convention pass.
BSI csaf-validator-lib 2.1.6 (MIT), driven by tests/csaf/validate.mjs: no errors in the schema and all mandatory 6.1.x tests.
Optional warnings left: key order, identification helpers on component-in-product entries, remediations for under-investigation items, canonical URL (exists only once published), CVSS score (no vectors stored).
The runner script includes a small resolve hook, because js-cvss 0.4.4 ships extensionless ESM imports.
Unit tests: tracking id and file name (CSAF §5.1), CVE detection, publisher namespace validation.
clippy:-D warnings for core, agent and dashboard (web and server).
Test plan check 28, marked [visible]. Stage only; no tag.
Part 3 of 4 for #498: a target's VEX statements as a **CSAF 2.0 VEX advisory** (`csaf_vex`). It is always a draft, for the manufacturer to review and publish.
## What
- **`compliance_core::csaf_docs`.** It builds on the same alerts and statements as the OpenVEX and CycloneDX VEX exports.
- Product tree: the target is the product, and each component is `default_component_of` it, with its purl.
- `affected` becomes `known_affected` with a remediation carrying the action statement: `vendor_fix` when a fixed version is known, else `mitigation`.
- `not_affected` becomes `known_not_affected`. The justification becomes a flag (CSAF's labels are OpenVEX's justifications) and the impact statement an `impact` threat.
- Each CVE appears once: a GHSA alert whose alias is that CVE merges into it, as CSAF test 6.1.23 requires.
- Every vulnerability has notes, as the VEX profile requires (6.1.27.5).
- Draft markings: tracking status `draft`, **TLP:AMBER**, `lang` taken from the UI, and the note "Draft, not published: check publisher and statements before release."
- **Publisher:** the workspace. The namespace comes from `?namespace=`, which must be an http(s) URL (else 400). Without one, the draft holds the placeholder `https://example.invalid/<workspace>`.
- **API:** `GET /api/v1/targets/{id}/csaf?namespace=&lang=de|en`. It shares its data loading with the VEX export.
- **Evidence pack:** `csaf-vex.json`, with the placeholder namespace.
- **Dashboard:** a web-address field and a "CSAF-Entwurf herunterladen" button in the VEX card.
- **Docs:** DE/EN sections in `guide/vex`. On publication, the TLP label becomes WHITE or GREEN; CSAF 2.0 uses TLP v1 labels, so "CLEAR" is not available there.
## Validation
- **Schemas:** the OASIS CSAF 2.0 schema and FIRST CVSS schemas are vendored from gocsaf v3.6.0 (Apache-2.0 / BSD-3-Clause). `vex_schemas` validates the advisory against them, with negative controls.
- **Ignored test (`--ignored`):**
- gocsaf `csaf_validator` (Apache-2.0): schema and file-name convention pass.
- BSI csaf-validator-lib 2.1.6 (MIT), driven by `tests/csaf/validate.mjs`: **no errors** in the schema and all mandatory 6.1.x tests.
- Optional warnings left: key order, identification helpers on component-in-product entries, remediations for under-investigation items, canonical URL (exists only once published), CVSS score (no vectors stored).
- The runner script includes a small resolve hook, because js-cvss 0.4.4 ships extensionless ESM imports.
- **Unit tests:** tracking id and file name (CSAF §5.1), CVE detection, publisher namespace validation.
- **clippy:** `-D warnings` for core, agent and dashboard (web and server).
Test plan check 28, marked [visible]. Stage only; no tag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
- compliance_core::csaf_docs: a csaf_vex advisory from the same alerts and
statements as the OpenVEX/CycloneDX VEX. The target is the product, each
component default_component_of it (with purl). affected -> known_affected
with a remediation (vendor_fix when a fixed version is known, else
mitigation, carrying the action statement); not_affected ->
known_not_affected with the justification as flag and the impact statement
as threat; one vulnerability per CVE (GHSA alerts with a CVE alias merge).
Always a draft: tracking status draft, TLP:AMBER, lang from the UI, and the
note "Draft, not published: check publisher and statements before
release."
- Publisher: the workspace; namespace from ?namespace= (http(s) URL, else
400) or the placeholder https://example.invalid/<workspace>.
- GET /api/v1/targets/{id}/csaf?namespace=&lang=; csaf-vex.json in the
evidence pack. The VEX export's loading is shared with it.
- Dashboard: web-address field and "CSAF-Entwurf herunterladen" in the VEX
card.
- Validation: vendored OASIS CSAF 2.0 schema and FIRST CVSS schemas (from
gocsaf v3.6.0); an #[ignore] test runs gocsaf csaf_validator (Apache-2.0)
and BSI csaf-validator-lib (MIT) mandatory and optional tests: no errors.
- Docs DE/EN (CSAF section; publish as WHITE/GREEN), test plan check 28.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit 8538b31682 into main2026-10-06 14:38:43 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part 3 of 4 for #498: a target's VEX statements as a CSAF 2.0 VEX advisory (
csaf_vex). It is always a draft, for the manufacturer to review and publish.What
compliance_core::csaf_docs. It builds on the same alerts and statements as the OpenVEX and CycloneDX VEX exports.default_component_ofit, with its purl.affectedbecomesknown_affectedwith a remediation carrying the action statement:vendor_fixwhen a fixed version is known, elsemitigation.not_affectedbecomesknown_not_affected. The justification becomes a flag (CSAF's labels are OpenVEX's justifications) and the impact statement animpactthreat.draft, TLP:AMBER,langtaken from the UI, and the note "Draft, not published: check publisher and statements before release."?namespace=, which must be an http(s) URL (else 400). Without one, the draft holds the placeholderhttps://example.invalid/<workspace>.GET /api/v1/targets/{id}/csaf?namespace=&lang=de|en. It shares its data loading with the VEX export.csaf-vex.json, with the placeholder namespace.guide/vex. On publication, the TLP label becomes WHITE or GREEN; CSAF 2.0 uses TLP v1 labels, so "CLEAR" is not available there.Validation
vex_schemasvalidates the advisory against them, with negative controls.--ignored):csaf_validator(Apache-2.0): schema and file-name convention pass.tests/csaf/validate.mjs: no errors in the schema and all mandatory 6.1.x tests.-D warningsfor core, agent and dashboard (web and server).Test plan check 28, marked [visible]. Stage only; no tag.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p