release/sbom/maven
Releases publish an SBOM
Implements release/sbom for the maven artifact: it runs when the release publishes one (see artifacts).
| Severity | warning |
| Tiers | 1 |
| Artifact | maven |
| Scope | root |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
The release runs the CycloneDX Gradle plugin’s cyclonedxBom task or the cyclonedx-maven-plugin (makeBom/makeAggregateBom), which read the build’s resolved dependencies, and publishes the BOM as an extra artifact (the cyclonedx classifier on Maven Central).
Why
Consumers and scanners need to know what is inside an artifact; generating the SBOM in the pipeline ties it to the exact build.
Capability applies when
release.exists || repo.artifacts.size() > 0Fix
Apply the CycloneDX Gradle plugin (org.cyclonedx.bom) and run ./gradlew cyclonedxBom in the release workflow (or bind cyclonedx-maven-plugin’s makeAggregateBom); publish the BOM with the artifact.
Agent instruction (from release/sbom): In the release workflow add a step producing an SBOM for each published artifact with its producer (syft writing SPDX JSON for files, BuildKit sbom: true for images, the build tool’s CycloneDX plugin for Maven, NuGet and Android) and upload the files with the release or publish them with the artifact. Do not change other steps. If the repo uses GoReleaser, add a sboms: section instead.
A finding that names no file points at the first workflow that publishes the artifact, or .github/workflows/release.yml when there is none.
Sources
- https://csrc.nist.gov/pubs/sp/800/218/final (standard, PS.3.2: Collect, safeguard, maintain, and share provenance data for all components of each software release)
- https://github.com/ossf/scorecard/blob/main/docs/checks.md (standard, SBOM)
- https://spdx.github.io/spdx-spec/v2.3/ (spec)
- https://cyclonedx.org/specification/overview/ (spec)
- https://fleetlint.org/baseline/#releases
- https://github.com/CycloneDX/cyclonedx-maven-plugin (spec)
- https://github.com/CycloneDX/cyclonedx-gradle-plugin (spec)
Generated by fleetlint docs from catalog v0.8.0.