Java applications containing bundled JavaScript
Jakarta WAR with an npm library pulled through mvnpm inside the esbuild plugin realm, deployed on a Payara image
The application and how it is built
A Jakarta EE web application packaged as a WAR and deployed on a Payara server image. It has one ordinary Maven dependency, commons-lang3, which ships as a jar in WEB-INF/lib. Its browser code uses lodash-es, which arrives as a Maven artifact from mvnpm, declared as a dependency of the esbuild Maven plugin and not of the project. esbuild bundles it into assets/app.js. The Jakarta API is provided scope: needed to compile, supplied by the server, and absent from the WAR.
What gets hidden, and how
lodash-es is hidden twice. It enters through a plugin's dependencies, so it is never in the project's dependency graph. It is then bundled, so no package boundary survives in the WAR.
| Component | Mechanism | In the artefact? | What happens to it |
|---|---|---|---|
| lodash-es@4.17.21 | plugin-realm+bundled | ships | a plugin dependency of esbuild-maven-plugin, bundled into assets/app.js; never in the project graph |
| esbuild-maven-plugin@2.0.0 | plugin-realm | does not ship | runs inside a Maven plugin's classloader, never in the project's dependency graph |
What a true SBOM would say
3 components ship, 1 of them transformed on the way in. 4 are known not to ship (3 build-tooling, 1 provided). 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
- lodash-es@4.17.21: named by 3 of 7 tools at the source stage, 0 of 4 tools at the artefact stage, 0 of 4 tools at the image stage.
- esbuild-maven-plugin@2.0.0: named by 1 of 7 tools at the source stage, 0 of 4 tools at the artefact stage, 0 of 4 tools at the image stage.
Shipped components found, by stage
Out of 3 that ship. Only the tools that scan all three stages are drawn; the table below has every tool.
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 | image | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Component | capycli | cdxgen | cyclonedx-maven-plugin | sbom-plus-maven-plugin | sbom-tool | syft | trivy | bom | cdxgen | syft | trivy (raw archive) | trivy | cdxgen | docker-scout | syft | trivy |
| Ships. In the artefact, including components that were shaded or bundled on the way in. | ||||||||||||||||
| payara-mvnpm-trace-lab@1.0.0 | ||||||||||||||||
| commons-lang3@3.18.0 | ||||||||||||||||
| lodash-es@4.17.21 plugin-realm+bundled | ||||||||||||||||
| 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. | ||||||||||||||||
| esbuild-maven-plugin@2.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 | 27 | 27 | 1/3 | 0 | 0 | 26 | 0 | 0/0 | 8.4 | 4.4 | 3.7 |
| cdxgen 11.3.2 | cyclonedx | 70 | 70 | 3/3 | 0 | 0 | 0 | 67 | 0/0 | 8.2 | 5.4 | 4.0 |
| cyclonedx-maven-plugin 2.9.1 | cyclonedx | 28 | 28 | 2/3 | 0 | 0 | 26 | 0 | 1/1 | 8.4 | 8.4 | 4.7 |
| sbom-plus-maven-plugin 1.1.0 | cyclonedx | 256 | 256 | 3/3 | 0 | 0 | 0 | 29+222 | 1/1 | 10.0 | 10.0 | 9.2 |
| sbom-tool 4.1.13 | spdx | 61 | 61 | 3/3 | 0 | 0 | 58 | 0 | 0/0 | 10.0 | 4.4 | 3.6 |
| syft 1.51.0 | cyclonedx | 7 | 3 | 2/3 | 0 | 0 | 1 | 0 | 0/0 | 6.1 | 4.4 | 3.4 |
| trivy 0.74.0 | cyclonedx | 4 | 3 | 2/3 | 0 | 0 | 0 | 0 | 0/0 | 5.7 | 4.3 | 3.7 |
| artefact | ||||||||||||
| bom 0.8.0 | spdx | 0 | 0 | 0/3 | 0 | 0 | 0 | 0 | 0/0 | 6.7 | 5.6 | 4.3 |
| cdxgen 11.3.2 | cyclonedx | 1 | 1 | 1/3 | 0 | 0 | 0 | 0 | 0/0 | 8.8 | 6.9 | 5.0 |
| syft 1.51.0 | cyclonedx | 2 | 2 | 2/3 | 0 | 0 | 0 | 0 | 0/0 | 5.7 | 4.9 | 3.8 |
| trivy-rawfile 0.74.0 | cyclonedx | 1 | 1 | 0/3 | 0 | 0 | 0 | 0 | 0/0 | 3.1 | 4.4 | 4.1 |
| trivy 0.74.0 | cyclonedx | 2 | 2 | 1/3 | 0 | 0 | 0 | 0 | 1/1 | 6.1 | 6.1 | 4.3 |
| image | ||||||||||||
| cdxgen 11.3.2 | cyclonedx | 590 | 378 | 1/3 | 0 | 0 | 0 | 0 | 0/0 | 7.9 | 5.1 | 3.2 |
| docker-scout 1.24.0 | spdx | 656 | 456 | 2/3 | 0 | 0 | 0 | 0 | 0/0 | 10.0 | 6.2 | 3.5 |
| syft 1.51.0 | cyclonedx | 589 | 450 | 2/3 | 0 | 0 | 0 | 0 | 0/0 | 2.3 | 4.4 | 2.2 |
| trivy 0.74.0 | cyclonedx | 583 | 446 | 2/3 | 0 | 0 | 0 | 0 | 1/1 | 8.7 | 7.1 | 3.7 |
- 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
- source / capycli leaked unlabelled: jakarta.annotation-api@3.0.0, jakarta.authentication-api@3.1.0, jakarta.data-api@1.0.1, jakarta.ejb-api@4.0.1, jakarta.el-api@6.0.1, jakarta.enterprise.concurrent-api@3.1.1, jakarta.enterprise.cdi-api@4.1.0, jakarta.enterprise.cdi-el-api@4.1.0 …
- source / cyclonedx-maven-plugin leaked unlabelled: jakarta.annotation-api@3.0.0, jakarta.authentication-api@3.1.0, jakarta.data-api@1.0.1, jakarta.ejb-api@4.0.1, jakarta.el-api@6.0.1, jakarta.enterprise.concurrent-api@3.1.1, jakarta.enterprise.cdi-api@4.1.0, jakarta.enterprise.cdi-el-api@4.1.0 …
- source / sbom-tool leaked unlabelled: jakarta.annotation-api@3.0.0, jakarta.authentication-api@3.1.0, jakarta.data-api@1.0.1, jakarta.ejb-api@4.0.1, jakarta.el-api@6.0.1, jakarta.enterprise.concurrent-api@3.1.1, jakarta.enterprise.cdi-api@4.1.0, jakarta.enterprise.cdi-el-api@4.1.0 …
- source / syft leaked unlabelled: jakarta.jakartaee-web-api@11.0.0
Reading the result
A tool that reads the project's dependency graph has no way to see lodash-es; a tool that lists what the build ran can name it at the source stage. The provided-scope API is the opposite case: it is in the graph and does not ship, so a tool that lists it without a scope overstates the WAR. In the image, the server's own libraries far outnumber the application's three components. Recall against so short a list says little about an image SBOM on its own.
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/payara-mvnpm-trace-lab@1.0.0 | primary component (WAR) |
pkg:maven/org.apache.commons/commons-lang3@3.18.0 | ordinary dependency; survives as WEB-INF/lib/commons-lang3-3.18.0.jar |
pkg:maven/org.mvnpm/lodash-es@4.17.21 | a plugin dependency of esbuild-maven-plugin, bundled into assets/app.js; never in the project graph |