feat(devices): a target's Siemens controllers on a DIN rail (SPS 4a part 2) #1078

Merged
sharang merged 9 commits from feat/siemens-devices-ui into main 2026-11-28 22:09:06 +00:00
Owner

SPS 4a part 2, after #1077: a target's Siemens controllers on their own page, built from the approved mockup.

Dashboard

  • /targets/{id}/devices (Steuerungen): controllers as modules on a DIN rail, each with a light: red (an advisory affects its firmware), green (named, not affected), grey (no advisory names it).
  • A module opens its Siemens advisories: severity, the fixed firmware, the verdict, the "Quelle" link.
  • Adding a controller: the order number is recognised while it is typed (shape, then the product name from the advisories). Firmware is edited inline; a controller can be removed.
  • A small Steuerungen card on the target page for PLC targets and targets with controllers (kept on Sharang's word; not in the mockup).
  • DE/EN, both themes, phone width.

API

  • GET /api/v1/targets/{id}/devices: the target's controllers, each with the Siemens advisories naming it.
  • GET /api/v1/devices/lookup?order_number=: what the advisories know of an order number (public data only).
  • Both read the advisory index as it is now; CVE alerts and tracker issues follow at the next scan, as the page says.

Matching fixes (in this PR on Sharang's word)

  • The fixed firmware comes from Siemens' vendor_fix text (only Update to V<version> with a clean end; checked against a sample of the live feed: hardware notes and versions like V3.X.18 are skipped). #1077's alerts get a fixed version for Siemens too.
  • A target with controllers but no code or project file now gets its CVE alerts (the no-code path stores the device SBOM).
  • Removing the last controller clears its components and alerts at the next scan.

Docs: docs/guide/plc.md gains "Siemens controllers by order number", and no longer says a scan sets VEX fixed (#1015).

Not covered: advisories naming a whole series ("S7-1200 CPU family"); PGP checks on the feed. The read-only view was not exercised locally.

Tests: core 357, agent 1262 pass; clippy clean (core, agent, dashboard server and web); fmt clean. Checked locally against synthetic advisories, screen by screen with the mockup.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

SPS 4a part 2, after #1077: a target's Siemens controllers on their own page, built from the approved mockup. **Dashboard** - `/targets/{id}/devices` (Steuerungen): controllers as modules on a DIN rail, each with a light: red (an advisory affects its firmware), green (named, not affected), grey (no advisory names it). - A module opens its Siemens advisories: severity, the fixed firmware, the verdict, the "Quelle" link. - Adding a controller: the order number is recognised while it is typed (shape, then the product name from the advisories). Firmware is edited inline; a controller can be removed. - A small Steuerungen card on the target page for PLC targets and targets with controllers (kept on Sharang's word; not in the mockup). - DE/EN, both themes, phone width. **API** - `GET /api/v1/targets/{id}/devices`: the target's controllers, each with the Siemens advisories naming it. - `GET /api/v1/devices/lookup?order_number=`: what the advisories know of an order number (public data only). - Both read the advisory index as it is now; CVE alerts and tracker issues follow at the next scan, as the page says. **Matching fixes (in this PR on Sharang's word)** - The fixed firmware comes from Siemens' `vendor_fix` text (only `Update to V<version>` with a clean end; checked against a sample of the live feed: hardware notes and versions like `V3.X.18` are skipped). #1077's alerts get a fixed version for Siemens too. - A target with controllers but no code or project file now gets its CVE alerts (the no-code path stores the device SBOM). - Removing the last controller clears its components and alerts at the next scan. **Docs:** `docs/guide/plc.md` gains "Siemens controllers by order number", and no longer says a scan sets VEX `fixed` (#1015). **Not covered:** advisories naming a whole series ("S7-1200 CPU family"); PGP checks on the feed. The read-only view was not exercised locally. **Tests:** core 357, agent 1262 pass; clippy clean (core, agent, dashboard server and web); fmt clean. Checked locally against synthetic advisories, screen by screen with the mockup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 9 commits 2026-11-28 13:57:32 +00:00
DeviceCheck in core puts a device's state and advisory rows together with
the scan's matcher. Siemens writes a fix only as vendor_fix text, so its
firmware is read from there too. The agent serves the target's devices and
an order number lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Each controller is a module whose light says whether a Siemens advisory
affects its firmware. The chosen one shows its advisories with the fixed
firmware and the Quelle link. The form recognises an order number while it
is typed. The target page gets a card for PLC targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Sampled across the feed: a vendor fix can name hardware (LOGO! V9 BM) or a
version with letters (V3.X.18); neither is a firmware to update to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
A PLC target without a project file took the no-code path and never
persisted its device entries, so its controllers raised no CVE alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
fix(scan): removing a target's last controller clears its components and alerts
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 5m2s
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 22m48s
fa60318c19
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 2d3311bd09 into main 2026-11-28 22:09:06 +00:00
Sign in to join this conversation.