DE EN

SBOM generation and verification for Java builds

Make your Maven dependency inventory part of every release. I help Java teams generate CycloneDX software bills of materials (SBOMs), check their dependency coverage, and retain the documents with their build artifacts.

SBOM integration for your delivery pipeline

An SBOM is useful when it matches the build you deliver. The service connects SBOM generation, verification, and artifact retention in your existing Maven and CI setup.

  • Build review: identify the Maven modules, dependency scopes, and release artifacts that need coverage.
  • CI integration: generate CycloneDX XML and JSON, require an attached SBOM, and fail the build when compile/runtime dependencies are missing from it.
  • Release handover: retain SBOMs with the corresponding release and document how your team generates and checks them.

This supports software handovers, supplier questionnaires, and dependency investigations. The checks described here cover the Maven dependency graph. Frontend packages, container images, and repackaged archives need their own coverage.

Built on SBOM Verifier

SBOM Verifier is an open source Maven plugin that checks attached CycloneDX SBOMs before publication. Its configurable rules check project identity, Maven dependency coverage, recorded checksums, and external references.

Read the source code on GitHub.

A missing dependency stops the build

The demo application uses Apache Commons Lang. Both example SBOMs identify the same application. One omits the library; the other includes it. SBOM Verifier 0.3.1 checks both against the application’s resolved Maven dependencies.

Missing dependency

The SBOM omits Commons Lang

The dependency is present in the Maven build and absent from the SBOM. Verification fails.

BUILD FAILURE
Missing dependency:
org.apache.commons:commons-lang3:jar::3.20.0
(scope compile)

Complete dependency coverage

The SBOM includes Commons Lang

The same application's dependency appears in the SBOM. Verification passes.

BUILD SUCCESS
Required SBOM attached.
Project identity matches.
Compile/runtime dependencies are covered.

The cards summarise the results of the included builds. Download the example to reproduce both results with Java 17 or newer, Maven 3.9.6 or newer, and Python 3. The script checks both exit codes and the missing-dependency diagnostic.

Download the runnable Maven demo

unzip sbom-verifier-demo-0.3.1.zip
cd sbom-verifier-demo
python3 run-demo.py

The ZIP includes the Maven project, both CycloneDX JSON examples, the comparison script, and instructions. The examples demonstrate dependency coverage; they are not vulnerability assessments or evidence of CRA conformity.

Plugin goals

GoalDescriptionDefault phase
sbom-verifier:check Runs configured rules on CycloneDX SBOMs attached to the Maven build. verify

What it checks

  • Completeness: The completeness rule checks the project identity and confirms that resolved compile and runtime dependencies, including transitive dependencies, appear in the SBOM. It excludes provided, test, and system dependencies. Extra SBOM components are allowed.
  • Required SBOM: Set requireSbom to true to fail when the module has no attached supported SBOM. Its default is false.
  • Dependency checksums: The checksum rule compares checksums in the SBOM with dependency artifacts. It can use an isolated local Maven repository for release checks.
  • External references: The validateReferences rule checks URLs in the SBOM. HTTP 429, HTTP 5xx, and connection failures produce unavailable-reference warnings by default. Set failOnUnavailable to true to make these failures fatal. Dependency findings also require failOnDependencies=true. You can configure redirect and authentication handling separately.

The plugin currently supports SBOMs produced by the CycloneDX Maven plugin. Some reference checks make network requests, so their results can depend on the availability of external sites. Completeness compares the Maven dependency graph with the SBOM; it does not inspect the contents of packaged or shaded archives. These checks do not assess vulnerabilities or establish CRA conformity.

Use SBOM Verifier

Version 0.3.1 is available from Maven Central. It requires Maven 3.9.6 or newer and Java 17 or newer. Unsupported Maven versions stop with a clear version requirement before rule loading. Maven downloads the plugin with the configuration below. No local source installation is required.

Add these plugins under <build><plugins> in the Maven module you want to check. CycloneDX attaches the SBOM during package; SBOM Verifier checks it during verify:

<plugin>
  <groupId>org.cyclonedx</groupId>
  <artifactId>cyclonedx-maven-plugin</artifactId>
  <version>2.9.1</version>
  <executions>
    <execution>
      <id>make-sbom</id>
      <phase>package</phase>
      <goals><goal>makeBom</goal></goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>de.grobmeier</groupId>
  <artifactId>sbom-verifier-maven-plugin</artifactId>
  <version>0.3.1</version>
  <executions>
    <execution>
      <id>check-sbom</id>
      <phase>verify</phase>
      <goals><goal>check</goal></goals>
      <configuration>
        <requireSbom>true</requireSbom>
        <rules>
          <completeness/>
          <checksum/>
          <validateReferences>
            <failOnDependencies>false</failOnDependencies>
            <failOnUnavailable>false</failOnUnavailable>
          </validateReferences>
        </rules>
      </configuration>
    </execution>
  </executions>
</plugin>

Run mvn verify in your project. Each checked module needs an attached supported SBOM. For a module that skips deployment, CycloneDX may need <skipNotDeployed>false</skipNotDeployed>.

Integration tests cover missing SBOMs and omitted dependencies.

Documentation

Bring SBOM checks into your build

Describe your Java modules, CI platform, and release process. I can help you define the coverage and integrate the checks into your team’s workflow.

Discuss your SBOM requirements