Part A of #515: reading vendor CSAF advisories for matching. This is offline core code; ingest (B) and matching (C) follow.
What
compliance_core::csaf_ingest::parse turns a CSAF 2.0 document into an Advisory:
Products:
from the product tree, where each product_version / product_version_range branch inherits vendor, family and name from its ancestors;
from full_product_names;
from relationship products (installed_on, default_component_of).
Each carries its exact version or vers range, CPE, purl, and order numbers (Siemens model_numbers, skus). Names are normalised for comparison: case and whitespace ("CODESYS Gateway ").
Vulnerabilities: CVE, title, description, the highest CVSS score and severity, all eight product_status keys grouped (affected / fixed / not affected / under investigation / recommended), and the remediations with category, details, url and products.
Advisory: id, title, publisher, TLP label, current release date, and the readable page: the first self reference that isn't the JSON or PDF. Siemens' terms require that link on every redistribution.
Helpers:AdvisoryProduct::covers(name, version) and Advisory::fixed_versions(vuln, name) for part C.
compliance_core::version:
cmp_dotted moves here from nvd_cpe.rs, which now imports it.
Vers parses and evaluates purl-spec vers ranges: = != < <= > >= *, |-joined, evaluated as intervals. Schemes generic/intdot/semver/all compare as dotted versions.
Providers (for B, verified)
CERT@VDE: one trusted provider per vendor at <vendor>.csaf-tp.certvde.com: codesys, wago, phoenixcontact, pilz, festo, helmholz, weidmueller, murrelektronik, janitza, beckhoff, lenze, turck, hilscher. There's no aggregator.
Siemens ProductCERT: 841 advisories, identified by MLFB and vers:intdot.
CISA OT: 3,950 advisories, mostly without identifiers. Off by default, per the decision.
Tests
Fixtures: CISA ICSA-26-260-07 (public), Siemens SSA-240718 (redistribution with link, see README), and a synthetic VDE-shaped advisory, since VDE states only a disclaimer.
vers cases taken from all three providers: closed range, open above, open below, two intervals, !=, exact, *.
An #[ignore] test parses the newest live advisory of CODESYS, Siemens and CISA; it passes.
The NVD matcher tests still pass.
clippy -D warnings for core and agent.
No test plan check: nothing visible yet. B/C add one. Stage only; no tag.
Part A of #515: reading vendor CSAF advisories for matching. This is offline core code; ingest (B) and matching (C) follow.
## What
- **`compliance_core::csaf_ingest::parse`** turns a CSAF 2.0 document into an `Advisory`:
- **Products:**
- from the product tree, where each `product_version` / `product_version_range` branch inherits vendor, family and name from its ancestors;
- from `full_product_names`;
- from relationship products (`installed_on`, `default_component_of`).
Each carries its exact version or `vers` range, CPE, purl, and order numbers (Siemens `model_numbers`, `skus`). Names are normalised for comparison: case and whitespace (`"CODESYS Gateway "`).
- **Vulnerabilities:** CVE, title, description, the highest CVSS score and severity, all eight `product_status` keys grouped (affected / fixed / not affected / under investigation / recommended), and the remediations with category, details, url and products.
- **Advisory:** id, title, publisher, TLP label, current release date, and the **readable page**: the first `self` reference that isn't the JSON or PDF. Siemens' terms require that link on every redistribution.
- **Helpers:** `AdvisoryProduct::covers(name, version)` and `Advisory::fixed_versions(vuln, name)` for part C.
- **`compliance_core::version`:**
- `cmp_dotted` moves here from `nvd_cpe.rs`, which now imports it.
- `Vers` parses and evaluates purl-spec `vers` ranges: `= != < <= > >= *`, `|`-joined, evaluated as intervals. Schemes generic/intdot/semver/all compare as dotted versions.
## Providers (for B, verified)
- **CERT@VDE:** one trusted provider per vendor at `<vendor>.csaf-tp.certvde.com`: codesys, wago, phoenixcontact, pilz, festo, helmholz, weidmueller, murrelektronik, janitza, beckhoff, lenze, turck, hilscher. There's no aggregator.
- **Siemens ProductCERT:** 841 advisories, identified by MLFB and `vers:intdot`.
- **CISA OT:** 3,950 advisories, mostly without identifiers. Off by default, per the decision.
## Tests
- Fixtures: CISA ICSA-26-260-07 (public), Siemens SSA-240718 (redistribution with link, see README), and a synthetic VDE-shaped advisory, since VDE states only a disclaimer.
- `vers` cases taken from all three providers: closed range, open above, open below, two intervals, `!=`, exact, `*`.
- An `#[ignore]` test parses the newest live advisory of CODESYS, Siemens and CISA; it passes.
- The NVD matcher tests still pass.
- clippy `-D warnings` for core and agent.
No test plan check: nothing visible yet. B/C add one. Stage only; no tag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
- compliance_core::csaf_ingest: a CSAF 2.0 advisory read into what matching
needs. Products from the product tree (vendor, family, name inherited by
each product_version / product_version_range branch), full_product_names
and relationships, with their exact version or vers range, CPE, purl and
order numbers (Siemens model_numbers, skus). Per vulnerability: CVE,
title, description, highest CVSS score and severity, affected / fixed /
not affected / under investigation / recommended products (all eight
product_status keys) and the remediations. The advisory's readable page
(a self reference that is not the JSON or PDF), the link Siemens' terms
ask for; TLP label. AdvisoryProduct::covers(name, version) and
Advisory::fixed_versions for matching.
- compliance_core::version: cmp_dotted moves here from nvd_cpe.rs (shared),
and a vers range parser per the purl spec (=, !=, <, <=, >, >=, *, |-joined
intervals; generic/intdot/semver/all compared as dotted versions).
- Fixtures: CISA ICSA-26-260-07 (public), Siemens SSA-240718 (terms allow
redistribution with the link, in the README), a synthetic VDE-shaped
advisory; an #[ignore] test reads the newest live advisory of CODESYS
(CERT@VDE), Siemens and CISA.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit b4dc84671f into main2026-10-06 16:11:08 +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 A of #515: reading vendor CSAF advisories for matching. This is offline core code; ingest (B) and matching (C) follow.
What
compliance_core::csaf_ingest::parseturns a CSAF 2.0 document into anAdvisory:product_version/product_version_rangebranch inherits vendor, family and name from its ancestors;full_product_names;installed_on,default_component_of).Each carries its exact version or
versrange, CPE, purl, and order numbers (Siemensmodel_numbers,skus). Names are normalised for comparison: case and whitespace ("CODESYS Gateway ").product_statuskeys grouped (affected / fixed / not affected / under investigation / recommended), and the remediations with category, details, url and products.selfreference that isn't the JSON or PDF. Siemens' terms require that link on every redistribution.AdvisoryProduct::covers(name, version)andAdvisory::fixed_versions(vuln, name)for part C.compliance_core::version:cmp_dottedmoves here fromnvd_cpe.rs, which now imports it.Versparses and evaluates purl-specversranges:= != < <= > >= *,|-joined, evaluated as intervals. Schemes generic/intdot/semver/all compare as dotted versions.Providers (for B, verified)
<vendor>.csaf-tp.certvde.com: codesys, wago, phoenixcontact, pilz, festo, helmholz, weidmueller, murrelektronik, janitza, beckhoff, lenze, turck, hilscher. There's no aggregator.vers:intdot.Tests
verscases taken from all three providers: closed range, open above, open below, two intervals,!=, exact,*.#[ignore]test parses the newest live advisory of CODESYS, Siemens and CISA; it passes.-D warningsfor core and agent.No test plan check: nothing visible yet. B/C add one. Stage only; no tag.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p