SPS item 4a, part 1 of 2: the model, the API and the matching. The dashboard fields come in part 2, after a mockup.
Why
Siemens ProductCERT names each affected CPU by its order number (MLFB) and a firmware range, and carries no purl or CPE. Prüfwerk matched Siemens advisories by purl only, so they almost never reached a customer's component.
What
Model:PlcDevice { order_number, firmware, label } on a target (devices), normalised on input: order number upper case without spaces, firmware without a leading V. A device without a Siemens-shaped order number or a numeric firmware is refused with 422, because it could not be matched.
SBOM: each device is one entry (package manager siemens-device) with its order number, in both the code and the PLC scan paths. The PLC path's SBOM scope now covers CODESYS and devices.
Matching:csaf_match asks the index for the Siemens advisories naming the device's order number, and matches the product's order number plus the firmware against its range (vers:intdot/<3.1.5, vers:all/*). Fixed versions are looked up by order number. A device is matched only against Siemens advisories.
Export: a device is a CycloneDX device with manufacturer Siemens.
API:devices on POST /api/v1/targets and PATCH (the update replaces the list).
Docs:docs/reference/tools.md, CSAF matching.
Checked against the live Siemens feed
I read the feed only, without saving any files. The test fixture is synthetic.
Every product whose name carries an order number also has it in model_numbers. That held for 376 of 376 products in 40 advisories, so the stored advisories need no re-read and PARSER_VERSION stays.
In the 15 newest CPU advisories, 360 of 410 affected products carry an order number. The remaining 50 are family entries ("S7-1200 CPU V2 family"), which are not matched to a device yet. That needs an order-number-to-family table and is a follow-up.
Expected alert volume: one common CPU (6ES7511-1AK02-0AB0) is named by 5 CVEs across the 39 CPU advisories: 1 critical, 1 high, 3 medium. Two of them apply to every firmware.
The advisory collection has under 1,000 documents and no indexes, so the order-number query adds no index.
Not in this PR
The dashboard fields (part 2, mockup first).
PGP signature checks on the feed (separate PR, with pinned key fingerprints).
Family-level matching.
Tests
Clippy with -D warnings passes on core, agent, mcp, and the dashboard (server and web); cargo fmt is clean.
core 276; agent lib 1124 against a local test Mongo; agent integration: all 39 binaries pass.
New tests:
devices are matched by order number and firmware range, with the fixed version;
a device is never matched against another provider, and a component merely named like it is not a device;
SPS item 4a, part 1 of 2: the model, the API and the matching. The dashboard fields come in part 2, after a mockup.
## Why
Siemens ProductCERT names each affected CPU by its order number (MLFB) and a firmware range, and carries no purl or CPE. Prüfwerk matched Siemens advisories by purl only, so they almost never reached a customer's component.
## What
- **Model:** `PlcDevice { order_number, firmware, label }` on a target (`devices`), normalised on input: order number upper case without spaces, firmware without a leading `V`. A device without a Siemens-shaped order number or a numeric firmware is refused with 422, because it could not be matched.
- **SBOM:** each device is one entry (package manager `siemens-device`) with its order number, in both the code and the PLC scan paths. The PLC path's SBOM scope now covers CODESYS and devices.
- **Matching:** `csaf_match` asks the index for the Siemens advisories naming the device's order number, and matches the product's order number plus the firmware against its range (`vers:intdot/<3.1.5`, `vers:all/*`). Fixed versions are looked up by order number. A device is matched only against Siemens advisories.
- **Export:** a device is a CycloneDX `device` with manufacturer Siemens.
- **API:** `devices` on `POST /api/v1/targets` and `PATCH` (the update replaces the list).
- **Docs:** `docs/reference/tools.md`, CSAF matching.
## Checked against the live Siemens feed
I read the feed only, without saving any files. The test fixture is synthetic.
- Every product whose name carries an order number also has it in `model_numbers`. That held for 376 of 376 products in 40 advisories, so the stored advisories need no re-read and `PARSER_VERSION` stays.
- In the 15 newest CPU advisories, 360 of 410 affected products carry an order number. The remaining 50 are family entries ("S7-1200 CPU V2 family"), which are not matched to a device yet. That needs an order-number-to-family table and is a follow-up.
- **Expected alert volume:** one common CPU (6ES7511-1AK02-0AB0) is named by 5 CVEs across the 39 CPU advisories: 1 critical, 1 high, 3 medium. Two of them apply to every firmware.
- The advisory collection has under 1,000 documents and no indexes, so the order-number query adds no index.
## Not in this PR
- The dashboard fields (part 2, mockup first).
- PGP signature checks on the feed (separate PR, with pinned key fingerprints).
- Family-level matching.
## Tests
- Clippy with `-D warnings` passes on core, agent, mcp, and the dashboard (server and web); `cargo fmt` is clean.
- core 276; agent lib 1124 against a local test Mongo; agent integration: all 39 binaries pass.
- New tests:
- devices are matched by order number and firmware range, with the fixed version;
- a device is never matched against another provider, and a component merely named like it is not a device;
- one index query per order number;
- input normalisation and refusals;
- the CycloneDX device type.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
A target can name the Siemens controllers it runs on (order number and
firmware). Each becomes an SBOM entry with its order number, matched
against Siemens ProductCERT advisories by the product order numbers they
already carry and the firmware range. A device matches only Siemens
advisories and exports as a CycloneDX device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
merged commit 5b4d8bbe5f into main2026-11-28 13:56:53 +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.
SPS item 4a, part 1 of 2: the model, the API and the matching. The dashboard fields come in part 2, after a mockup.
Why
Siemens ProductCERT names each affected CPU by its order number (MLFB) and a firmware range, and carries no purl or CPE. Prüfwerk matched Siemens advisories by purl only, so they almost never reached a customer's component.
What
PlcDevice { order_number, firmware, label }on a target (devices), normalised on input: order number upper case without spaces, firmware without a leadingV. A device without a Siemens-shaped order number or a numeric firmware is refused with 422, because it could not be matched.siemens-device) with its order number, in both the code and the PLC scan paths. The PLC path's SBOM scope now covers CODESYS and devices.csaf_matchasks the index for the Siemens advisories naming the device's order number, and matches the product's order number plus the firmware against its range (vers:intdot/<3.1.5,vers:all/*). Fixed versions are looked up by order number. A device is matched only against Siemens advisories.devicewith manufacturer Siemens.devicesonPOST /api/v1/targetsandPATCH(the update replaces the list).docs/reference/tools.md, CSAF matching.Checked against the live Siemens feed
I read the feed only, without saving any files. The test fixture is synthetic.
model_numbers. That held for 376 of 376 products in 40 advisories, so the stored advisories need no re-read andPARSER_VERSIONstays.Not in this PR
Tests
-D warningspasses on core, agent, mcp, and the dashboard (server and web);cargo fmtis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9