feat(sbom): CycloneDX 1.6 export with BSI TR-03183-2 properties (#508, part A) (#509)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy MCP (push) Successful in 2m21s
CI / Deploy Dashboard (push) Successful in 5m9s
CI / Deploy Agent (push) Successful in 6m54s

This commit was merged in pull request #509.
This commit is contained in:
sharang committed 2026-10-06 14:23:40 +00:00
1 parent 4448a5394f
commit 1923a6c433
18 files changed
+2708 -273

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ manifest of sha256 checksums) is also served as one ZIP at
| Tool | Description |
|------|-------------|
| `get_sbom` | A target's whole SBOM as one CycloneDX 1.5 (default) or SPDX 2.3 document, the same the API exports. |
| `get_sbom` | A target's whole SBOM as one CycloneDX 1.6 (default) or SPDX 2.3 document, the same the API exports. |
| `list_sbom_packages` | List SBOM packages with filters for repository, vulnerabilities, package manager, and license. |
| `sbom_vuln_report` | Generate a vulnerability report for a repository showing all packages with known CVEs. |
+45 -12
View File
@@ -189,18 +189,39 @@ Copyleft-licensed dependencies can require you to release your source code under
works for one target at a time; without a selection the export says
**Zuerst ein Prüfobjekt wählen**.
2. Click **Exportieren** and choose a format:
- **CycloneDX 1.5** -- JSON, widely supported by security tools
- **CycloneDX 1.6** -- JSON, widely supported by security tools
- **SPDX 2.3** -- the Linux Foundation standard, common for license compliance
3. Click **Herunterladen**. The SBOM downloads as a JSON file.
The evidence pack on the target's page also contains both formats.
The CycloneDX document follows the CycloneDX 1.5 schema: every component has
a `bom-ref` (its purl, or `<package manager>:<name>@<version>`), the product
itself is `metadata.component` with the `bom-ref` `pkg:generic/<target name>`,
and the known vulnerabilities are listed at the top level, each naming the
components it affects. Licenses are an SPDX id, an SPDX expression or a named
license, as CycloneDX allows.
The CycloneDX document follows the CycloneDX 1.6 schema and, as far as
Prüfwerk has the data, BSI TR-03183-2 v2.1:
- Every component has a `bom-ref` (its purl, or
`<package manager>:<name>@<version>`) and, from its purl, its `group` (a
Maven group id, an npm scope).
- The product itself is `metadata.component`, named after the target, with
the `bom-ref` and purl `pkg:generic/<target name>` and as version the time
its SBOM data was last compiled (the TR's rule for a component without a
version).
- The SBOM's creator is BreakPilot GmbH (`metadata.manufacturer`, contact
`kontakt@breakpilot.com`), which generates the document.
- Registry packages carry the TR's properties: `bsi:component:filename` (the
file the package is distributed as, e.g. `log4j-core-2.17.1.jar`,
`lodash-4.17.21.tgz`, `newtonsoft.json.13.0.3.nupkg`) and, as for the TR's
rpm example, `bsi:component:executable` `non-executable`,
`bsi:component:archive` `archive`, `bsi:component:structured`
`structured`. Packages whose file the purl does not name (PyPI, Go
modules) and components without a purl get none.
- The dependency graph has the product depending on every component, and
each component as its own entry. The SBOM is flat (which component depends
on which is not known), so `compositions` states it `incomplete`.
- Licenses are an SPDX id, an SPDX expression or a named license, marked
`acknowledgement: declared`: they are what the package declares, not a
licence Prüfwerk concluded.
- The known vulnerabilities are listed at the top level, each naming the
components it affects.
## VEX: the status of each vulnerability
@@ -230,7 +251,7 @@ A `not_affected` or `fixed` someone stated is never changed by a scan. If the
vulnerability comes back, the scan's `fixed` is withdrawn.
The statements are exported per target as **OpenVEX 0.2.0** and as
**CycloneDX 1.5 VEX** (the SBOM with each vulnerability's analysis), both
**CycloneDX 1.6 VEX** (the SBOM with each vulnerability's analysis), both
checked against their official schemas, and are part of the evidence pack
(`vex.openvex.json`, `vex.cdx.json`). CycloneDX names the statuses
differently:
@@ -269,10 +290,22 @@ evidence for the CRA requirement **cra-ai-23** (SBOM): it is shown there on
the target's CRA page and is in the evidence pack as `sbom-quality.json`, but
it raises no findings and does not change the requirement's state.
The score rates the document, not the software. Today's export is CycloneDX
1.5 without suppliers, hashes or the TR's component properties, so BSI
TR-03183-2, which asks for CycloneDX 1.6 and those fields, grades it low; the
failed checks list what the export would need.
The score rates the document, not the software. Against BSI TR-03183-2 the
export meets the format, creator, timestamp, name, version, dependency and
identifier checks, and the file properties for registry packages. Still
open, and why:
- **Component creator**: the email or URL of each package's maintainer.
Prüfwerk does not record it yet.
- **Hash of the deployable component** (SHA-512) and its download URL: not
recorded yet; lockfiles hold them for npm and NuGet. Cargo, Python and
Maven lockfiles only have SHA-256 hashes, which the TR does not accept.
- **Distribution licence**: the licence the product is distributed under
(`acknowledgement: concluded`) is the manufacturer's decision; the export
states the declared licences only.
- **File properties of the product and of packages without a known file**:
the product is a logical component in the TR's terms, which needs no file
properties; sbomqs counts it like a file.
## Compare Tab
+1 -1
View File
@@ -51,6 +51,6 @@ the vulnerability comes back, the scan withdraws its "Fixed".
## Downloading
**Download OpenVEX** and **Download CycloneDX VEX** save the target's
statements as OpenVEX 0.2.0 and CycloneDX 1.5. Both files are also in the
statements as OpenVEX 0.2.0 and CycloneDX 1.6. Both files are also in the
evidence pack (`vex.openvex.json`, `vex.cdx.json`). Formats, how the terms map
and the API: see [SBOM](./sbom.md#vex-the-status-of-each-vulnerability).
+1 -1
View File
@@ -53,7 +53,7 @@ wieder auf, nimmt die Prüfung ihr „Behoben“ zurück.
## Herunterladen
**OpenVEX herunterladen** und **CycloneDX VEX herunterladen** speichern die
Aussagen des Prüfobjekts als OpenVEX 0.2.0 bzw. CycloneDX 1.5. Beide Dateien
Aussagen des Prüfobjekts als OpenVEX 0.2.0 bzw. CycloneDX 1.6. Beide Dateien
liegen auch im Nachweispaket (`vex.openvex.json`, `vex.cdx.json`). Formate,
Zuordnung der Begriffe und API: siehe
[Stückliste (SBOM)](./sbom.md#vex-the-status-of-each-vulnerability).
@@ -26,6 +26,7 @@ together on stage in one pass before the next prod promotion.
| #496 | SBOM quality score (sbomqs) |
| #494 | DevSkim: .NET SAST without a build (C#, VB.NET, .config) |
| #498 (2/4) | VEX editor and downloads on the target page |
| #508 (A) | CycloneDX 1.6 SBOM with BSI TR-03183-2 properties |
**Customer-visible on the next prod rescan** is marked **[visible]**: these
change what a customer sees on their existing targets, without them doing
@@ -546,6 +547,37 @@ Use the target of check 22 (one with CVE alerts), as IT-admin and as member.
- **[visible]** a new card on every target page; the SBOM page's export still
downloads as before (its download helper moved).
### 27. #508 part A: CycloneDX 1.6 and BSI TR-03183-2
Use a target with npm and Maven dependencies (e.g. the log4j/gson target of
check 19) and one with a Python project.
- **Do:** rescan; open **SBOM**, select the target, open **SBOM-Qualität**.
**Expect:** BSI TR-03183-2 v2.1 scores clearly higher than before (below 1,
F). The test document scores 6.7 (D); a real target lands lower where
components lack a pinned version, a purl or a known file. Failed checks
left: the component creator, the deployable hash, the distribution
licence, and the file properties for the product and packages without a
known file.
- **Do:** export **CycloneDX 1.6**; download the evidence pack.
**Expect:**
- `specVersion` `1.6`; it validates (CycloneDX's online validator, or
`sbomqs score --profile bsi-v2.1`);
- `metadata.manufacturer` is BreakPilot GmbH with `kontakt@breakpilot.com`;
- `metadata.component` is the target by its name (no longer
`repo-<id>`), with a purl and as version a timestamp;
- log4j-core has `group` `org.apache.logging.log4j` and the properties
`bsi:component:filename` `log4j-core-2.14.1.jar`, `executable`
`non-executable`, `archive` `archive`, `structured` `structured`;
Python packages have none of them;
- licences carry `acknowledgement: declared`;
- `dependencies` lists the product depending on every component, each
component on its own; `compositions` says `incomplete`.
The evidence pack's `sbom.cdx.json` and `vex.cdx.json` are 1.6 too.
- **Do:** MCP `get_sbom` for the target. **Expect:** the same 1.6 document.
- **[visible]** SBOM downloads and evidence packs are CycloneDX 1.6 with the
new fields, and the SBOM quality score rises on the next rescan.
## After the pass
- The nightly job on `main` is green with the new mobile targets.