When build plugins generate application code
Zero declared dependencies; a Maven plugin's transitive payload generates runtime code during the build
The application and how it is built
A Java application that declares no dependencies at all. Its build runs a Maven plugin, trace-injector-maven-plugin, in the generate-sources phase. The plugin has a dependency of its own, trace-route-payload, which carries a route definition. The plugin turns that into a Java class and a ServiceLoader entry, and both are compiled into the application's jar.
What gets hidden, and how
Maven resolves a plugin and the plugin's dependencies into a classloader of their own, separate from the project's dependency graph. Code the plugin generates ends up in the jar as the application's own classes, with nothing to say where it came from.
| Component | Mechanism | In the artefact? | What happens to it |
|---|---|---|---|
| trace-injector-maven-plugin@1.0.0 | plugin-realm | does not ship | bound to generate-sources; generates GeneratedTraceRoute.java and ServiceLoader metadata |
| trace-route-payload@1.0.0 | plugin-realm | does not ship | transitive dependency of the plugin; carries the /hidden/build-info route that ends up compiled into the jar |
What a true SBOM would say
1 components ship. 4 are known not to ship (4 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
- trace-injector-maven-plugin@1.0.0: named by 1 of 7 tools at the source stage, 0 of 4 tools at the artefact stage.
- trace-route-payload@1.0.0: named by 1 of 7 tools at the source stage, 0 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-maven-plugin | sbom-plus-maven-plugin | sbom-tool | syft | trivy | bom | cdxgen | syft | trivy (raw archive) | trivy |
| Ships. In the artefact, including components that were shaded or bundled on the way in. | ||||||||||||
| maven-plugin-hidden-content@1.0.0 | ||||||||||||
| Present in the build, absent from the artefact. Plugins and their payloads, imported BOMs, and dependencies the build file requires but the artefact never contains. Listing one is right when it is marked as not shipping. | ||||||||||||
| trace-injector-maven-plugin@1.0.0 plugin-realm | ||||||||||||
| trace-route-payload@1.0.0 plugin-realm | ||||||||||||
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 | 0 | 0 | 0/1 | 0 | 0 | 0 | 0 | 0/0 | 6.7 | 6.0 | 5.7 |
| cdxgen 11.3.2 | cyclonedx | 0 | 0 | 0/1 | 0 | 0 | 0 | 0 | 0/0 | 6.7 | 8.0 | 5.7 |
| cyclonedx-maven-plugin 2.9.1 | cyclonedx | 1 | 1 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 8.8 | 6.2 | 5.0 |
| sbom-plus-maven-plugin 1.1.0 | cyclonedx | 172 | 172 | 1/1 | 0 | 0 | 0 | 4+167 | 0/0 | 10.0 | 9.9 | 9.2 |
| sbom-tool 4.1.13 | spdx | 1 | 1 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 10.0 | 5.9 | 4.0 |
| syft 1.51.0 | cyclonedx | 1 | 1 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 4.5 | 4.3 | 3.4 |
| trivy 0.74.0 | cyclonedx | 3 | 2 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 4.9 | 4.0 | 3.6 |
| artefact | ||||||||||||
| bom 0.8.0 | spdx | 0 | 0 | 0/1 | 0 | 0 | 0 | 0 | 0/0 | 6.7 | 5.6 | 4.3 |
| cdxgen 11.3.2 | cyclonedx | 2 | 2 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 8.6 | 6.1 | 4.5 |
| syft 1.51.0 | cyclonedx | 1 | 1 | 1/1 | 0 | 0 | 0 | 0 | 0/0 | 4.9 | 4.7 | 3.7 |
| trivy-rawfile 0.74.0 | cyclonedx | 1 | 1 | 0/1 | 0 | 0 | 0 | 0 | 0/0 | 3.1 | 4.4 | 4.1 |
| trivy 0.74.0 | cyclonedx | 1 | 1 | 0/1 | 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.
Reading the result
The jar contains one package, the application itself, so a tool that names only that has described what ships. What it has not described is that part of the application's behaviour came from a plugin's dependency. That is a build-time influence, and an SBOM can record it only by listing what the build ran. Whether it should depends on what the SBOM is for. The benchmark counts such a listing as correct when it is marked as not shipping.
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:maven/dev.noregressions.trace/maven-plugin-hidden-content@1.0.0 | primary component; the only package in the jar |