Dependencies generated during Python builds
Direct pip dependency pulls a transitive sdist whose PEP 517 backend generates the installed module
The application and how it is built
A Python application whose requirements.txt names one package, reportkit. reportkit's metadata requires tracehook-demo, which is available only as a source distribution. When pip installs it, pip runs the build backend the package nominates, tracehook_backend, and that backend generates the module that gets installed.
What gets hidden, and how
Installing a source distribution means running code the dependency supplies. The installed files are the output of that code, and the transitive dependency is not written anywhere in the application's own files.
| Component | Mechanism | In the artefact? | What happens to it |
|---|---|---|---|
| tracehook-demo@1.0.0 | pep517-generated | ships | transitive, sdist-only; its __init__.py and build-hook.json were created by tracehook_backend during pip install |
What a true SBOM would say
2 components ship, 1 of them transformed on the way in. 1 are known not to ship (1 build-tooling). Those influence the build or run during it; a tool may list them, as long as it marks them.
The list was written by hand from the build files, the lockfiles and the listing of the built archive, and the project's own proof-check.sh asserts what ends up in the artefact. It is in expected.json, and the full list of what ships is at the foot of this page.
What the tools reported
- tracehook-demo@1.0.0: named by 0 of 6 tools at the source stage, 2 of 4 tools at the artefact stage.
Component by component
Ships: Y exact version, v wrong version, p wrong group or namespace, n not named. Does not ship: L listed and marked, X listed unmarked, · not listed. A tool appears under a stage only if it was run there, so an empty column never stands for a miss. Select a cell to see what is behind it.
Select a cell.
| source | artefact | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Component | capycli | cdxgen | cyclonedx-python | sbom-tool | syft | trivy | cyclonedx-python | sbom4python | syft | trivy |
| Ships. In the artefact, including components that were shaded or bundled on the way in. | ||||||||||
| reportkit@1.0.0 | ||||||||||
| tracehook-demo@1.0.0 pep517-generated | ||||||||||
Every document
| Content accuracy | Baseline conformance | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Tool | Format | Comps | In scope | Shipped found | Wrong ver | Wrong purl | Leaked | Labelled | Hashes ok | NTIA 2021 | NTIA/CISA 2026 | BSI v2.1 |
| source | ||||||||||||
| capycli 2.12.0 | cyclonedx | 1 | 1 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 8.8 | 6.9 | 5.0 |
| cdxgen 11.3.2 | cyclonedx | 2 | 2 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 8.6 | 6.1 | 4.5 |
| cyclonedx-python 8.0.1 | cyclonedx | 1 | 1 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 8.8 | 5.6 | 5.3 |
| sbom-tool 4.1.13 | spdx | 1 | 1 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 10.0 | 5.9 | 4.0 |
| syft 1.51.0 | cyclonedx | 1 | 1 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 4.5 | 4.3 | 3.4 |
| trivy 0.74.0 | cyclonedx | 3 | 2 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 4.9 | 4.0 | 3.6 |
| artefact | ||||||||||||
| cyclonedx-python 8.0.1 | cyclonedx | 3 | 3 | 2/2 | 0 | 0 | 1 | 0 | 0/0 | 8.6 | 5.3 | 4.4 |
| sbom4python 0.12.6 | cyclonedx | 2 | 2 | 1/2 | 0 | 0 | 0 | 0 | 0/0 | 6.1 | 5.2 | 4.3 |
| syft 1.51.0 | cyclonedx | 9 | 3 | 2/2 | 0 | 0 | 1 | 0 | 0/0 | 4.5 | 4.4 | 2.9 |
| trivy 0.74.0 | cyclonedx | 1 | 1 | 0/2 | 0 | 0 | 0 | 0 | 0/0 | 3.1 | 4.4 | 4.1 |
- In scope: package components whose purl type is one of the test case's ecosystems (OS packages in images are ignored).
- Shipped found: recall against what is really in the artefact, at the exact version.
- Wrong ver: named, but at a version that does not ship. Wrong purl: right name and version under the wrong group, so no advisory database will match it.
- Leaked: things that do not ship (test, dev, build tooling,
provided, BOM imports) listed with nothing a consumer could filter on. - Labelled: the same things listed with a scope or property that marks them, which is correct.
+Ncounts further labelled components outside the known list. - Hashes ok: hashes that match the real digest of the jar inside the built artefact, over hashes the tool emitted for those jars.
- NTIA 2021, NTIA/CISA 2026, BSI v2.1:
sbomqs compliancetotals out of 10. They measure whether the fields are present, not whether the inventory is right.
Details
- artefact / cyclonedx-python leaked unlabelled: pip@*
- artefact / syft leaked unlabelled: pip@*
Reading the result
From requirements.txt alone a tool cannot name tracehook-demo, because it is not written there and has to be resolved. A tool that reads the installed environment can. None can say that the module's contents were generated at install time. pip is also in the environment, as tooling, and a tool that lists it without a mark counts as a leak here.
This is our interpretation. The counts above are what the run recorded; why a tool found or missed something is inferred from how the tool works, not established by the data. Limits of the benchmark.
Evidence
- The project, and its walkthrough from the workshop it comes from.
- Ground truth (
expected.json). - Every SBOM generated for this test case at the source and artefact stages.
- The scores for every document, machine-readable.
Ground truth: what ships
| Component | Note |
|---|---|
pkg:pypi/reportkit@1.0.0 | the only declared dependency |
pkg:pypi/tracehook-demo@1.0.0 | transitive, sdist-only; its __init__.py and build-hook.json were created by tracehook_backend during pip install |