feat(sbom): explain an empty or incomplete SBOM with findings (#979) (#985)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m3s
CI / Deploy MCP (push) Successful in 2m44s
CI / Deploy Dashboard (push) Successful in 3m46s
CI / Deploy Agent (push) Successful in 5m55s

Source code without a manifest or lockfile gave an empty SBOM with no
explanation, which reads as "no libraries". Two findings of a new
sbom-coverage check now say why:

- sbom-no-manifest (Medium): code in a language with a package manager
  (Python, JS/TS, Rust, Go, Java/Kotlin, C#, PHP, Ruby, Dart) and no
  manifest or lockfile for it outside vendor directories, one per
  ecosystem. Never for C/C++, Yocto layers, or a tree whose components
  come from its sources (library headers, firmware, CODESYS).
- sbom-dependencies-unresolved (Low): a manifest whose dependencies were
  not resolved, one per manifest the SBOM stage already lists under
  sbom_dependencies; legacy build systems keep their own finding.

Each finding names a concrete way to add the missing file, maps to the
SBOM requirement (cra-ai-23, also bound in the control map) and closes at
the next scan that no longer reports it, as the check completes on every
code scan. Dart is now detected as a source language.

The SBOM page shows an explanation instead of an empty table: where the
SBOM comes from, the target's open findings with their examples and a
link, or a general example. The findings API takes a scanner filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #985.
This commit is contained in:
sharangandClaude Opus 5.5 committed 2026-11-12 09:21:59 +00:00
1 parent fc72b6a1f4
commit ca8a662b60
20 files changed
+931 -6

No files matched your search

+1
View File
@@ -134,6 +134,7 @@ The most common types in a scan of source code:
| **OAuth** | Prüfwerk's own pattern rules |
| **Code-Qualität** (Lint) | Linters, where the deployment runs them |
| **SPS-Steuerungslogik** (PLC control logic) | Prüfwerk's PLC analyser, see [SPS / PLC (CODESYS)](/guide/plc) |
| **Vollständigkeit der Stückliste** (SBOM completeness) | Code without a manifest or lockfile, and manifests whose dependencies were not resolved, see [SBOM](/guide/sbom#when-the-sbom-is-empty-or-incomplete) |
| **Penetrationstest**, **Dynamische Prüfung (DAST)** | Entered or imported by hand, see [Befunde aus manuellen Tests](/guide/manual-findings) |
## Statuses
+41
View File
@@ -86,6 +86,41 @@ and is not judged.
Firmware images, container images and app packages are not unpacked yet; their
components come from the source code.
### When the SBOM is empty or incomplete
An SBOM without components does not mean the software uses no libraries:
the code may simply not declare them. Two findings of the type
**Vollständigkeit der Stückliste** (SBOM completeness) say so, both mapped to
the CRA requirement *Software Bill of Materials (SBOM)*:
| Rule | Severity | When |
|------|----------|------|
| `sbom-no-manifest` | Medium | The code is in a language with a package manager (Python, JavaScript/TypeScript, Rust, Go, Java/Kotlin, C#, PHP, Ruby, Dart), but the tree holds no manifest or lockfile for it anywhere outside vendor directories, and the SBOM lists no component of that ecosystem. One finding per ecosystem. |
| `sbom-dependencies-unresolved` | Low | A manifest exists, but its dependencies were not resolved: no lockfile, or one no tool reads (`bun.lockb`, Gradle without dependency locking, `<PackageReference>` without `packages.lock.json`). One finding per manifest, the same gap that is listed under **Nicht ausgeführt**. A legacy build system is reported by its own finding instead (see above). |
Each finding says why the SBOM is empty or incomplete and how to add the
missing file, for example:
- **Python** -- `pip freeze > requirements.txt` in the project's environment,
or the dependencies in `pyproject.toml` and `uv lock` or `poetry lock`;
- **JavaScript/TypeScript** -- the dependencies in `package.json`;
`npm install` writes `package-lock.json`;
- **Rust** -- commit `Cargo.toml` and `Cargo.lock`;
- **Go** -- `go mod init` and `go mod tidy` write `go.mod` and `go.sum`;
- **Java/Kotlin** -- a Maven `pom.xml` or a Gradle build file, with Gradle
also `gradle.lockfile`;
- **C#** -- the NuGet packages in the `.csproj` file and the
`packages.lock.json` that `dotnet restore` writes;
- **PHP**, **Ruby**, **Dart** -- `composer.json`/`composer.lock`,
`Gemfile`/`Gemfile.lock`, `pubspec.yaml`/`pubspec.lock`.
C and C++ have no standard manifest, so their code never raises
`sbom-no-manifest`; neither does a tree whose components come from its
sources (library headers, the firmware build, a CODESYS archive, Yocto
layers) or a PLC target. Prüfwerk does not guess the components or run the
project's code to resolve them. A finding closes at the next scan that
finds the manifest or lockfile.
## Known vulnerabilities
Package dependencies are matched against [OSV.dev](https://osv.dev/). Libraries
@@ -123,6 +158,12 @@ complete scan.
Open **Stückliste** in the sidebar. The **Pakete** (Packages) tab lists the
components of all targets, 50 per page.
When a target has no components at all, the tab says why instead of showing
an empty table: where the SBOM comes from, and the target's open
[SBOM completeness findings](#when-the-sbom-is-empty-or-incomplete), each with
its example and a link to the finding. Without such a finding (all targets,
or C/C++ code) it gives a general example.
### Charts for one target
With one target picked, two bar charts open the tab ("Diagramm"; "Tabelle"
+1 -1
View File
@@ -176,7 +176,7 @@ as a clean result: the CRA requirements it checks show as **Nicht geprüft**.
| **Testdaten (fixtures, testdata)** | Testdaten, von der ganzen Prüfung ausgenommen (Codeanalyse, Stückliste, CVEs): *(directories)* | Nothing; for information. Findings an earlier scan reported there are closed as test data. |
| **Ausgenommene Pfade** | In den Einstellungen des Prüfobjekts ausgenommen, von der ganzen Prüfung ausgenommen (Codeanalyse, Stückliste, CVEs): *(paths)* | Nothing; for information. Change the list under **Bearbeiten**. |
| e.g. **Statische Codeanalyse (Semgrep)**, **C/C++-Analyse (cppcheck)** | *(tool)* wurde nicht fertig; was es prüft, gilt als nicht bewertet. | Start the scan again; if it recurs, contact support. |
| **Abhängigkeiten (SBOM)** | *(manifest)* ohne Lockfile: Die Versionen der Abhängigkeiten und ihre CVEs sind nicht bekannt. | Commit the lockfile (see below). |
| **Abhängigkeiten (SBOM)** | *(manifest)* ohne Lockfile: Die Versionen der Abhängigkeiten und ihre CVEs sind nicht bekannt. | Commit the lockfile (see below). The same gap is a Low finding, `sbom-dependencies-unresolved`, which closes once the lockfile is there; see [SBOM](/guide/sbom#when-the-sbom-is-empty-or-incomplete). |
| e.g. **Firmware-Binäranalyse**, **Container-Analyse**, **Mobile-App-Analyse** | e.g. Firmware-Images werden noch nicht entpackt … | Nothing analyses these files yet; scan the source code instead. |
| **SPS-Bibliotheken (SBOM)** | *(file)* ist kein lesbares CODESYS-Projektarchiv. | Export the archive again with *File → Project Archive*, with the referenced libraries ticked. |
| **SPS-Projekt (natives Format)** | CODESYS-Projekt im nativen Format, Steuerungslogik nicht geprüft: *(files)* … | Export the POUs as PLCopen XML (*Project → Export PLCopenXML*) and add the export to the target; see [PLC / SPS](/guide/plc), which also has a script that exports it automatically. |