feat(sbom): a machine's SBOM, its parts with their suppliers (#1026)
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 / Agent integration (pull_request) Successful in 5m9s
CI / Check (pull_request) Successful in 21m17s

A machine is a registry project of kind `product`, made of its targets:
in-house ones and components bought in (#1025). GET
/api/v1/projects/{id}/sbom returns its CycloneDX 1.6 SBOM: the machine as
a device, each part with its supplier (the workspace for one made
in-house) and the supplier's version, the parts' components once each,
and a graph of the machine depending on its parts and each part on its
own components. Part refs are built from target ids, so names never
collide. The supplier's product entry is the part, not a component of
it; archived targets are left out.

The vulnerability listing of the target SBOM moves into its own helper,
shared by both; the CycloneDX schema test helpers move to tests/common.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-17 10:48:09 +01:00
1 parent 0790810afb
commit 87d8386277
11 files changed
+546 -30

No files matched your search

+22
View File
@@ -481,6 +481,28 @@ Prüfwerk has the data, BSI TR-03183-2 v2.1:
(`source` NVD) when one is known, with its GitHub advisory under
`references`; one without a CVE under the advisory's id.
### A machine's SBOM
A machine is a project of kind **product** (projects are managed in the
portal). Its parts are the targets assigned to it, the ones made in-house
and the components bought in from suppliers. `GET
/api/v1/projects/{id}/sbom` returns the machine's SBOM as CycloneDX 1.6:
- The machine is `metadata.component`, of type `device`.
- Each part is a component of the machine with its `supplier`: the supplier
of a bought-in component, the workspace for a part made in-house. A
bought-in part's version is the supplier's version of the product; a part
made in-house carries the time its SBOM data was last compiled, as for a
target.
- Each part's components follow. One that two parts contain is listed once.
The supplier's product itself is the part, not one of its components.
- The dependency graph has the machine depending on its parts and each part
on its own components. Which of a part's components depend on which is not
known, so `compositions` states it `incomplete`.
- Archived targets are left out. A topic project, or a product without
targets, has no SBOM (422). More than 100,000 components are refused (413),
as for one target.
## VEX: the status of each vulnerability
For each known vulnerability (CVE alert) of a target you state whether the