fleetlint Policy for a fleet of repositories
v0.4
Getting started

release/sbom

Releases publish an SBOM

Severitywarning
Tiers1
Stacksany
Scoperoot
Kindoutcome
Sourcelibrary v0.1.0
Selected byfleetlint-recommended@v0.1.0

Requirement

Every release that publishes artifacts (a tag-triggered pipeline beyond git-cliff) produces an SPDX or CycloneDX SBOM for them, generated inside the release pipeline and published alongside them. A release that only publishes to a package registry (npm, PyPI, crates.io, RubyGems, pub.dev, NuGet) and uploads nothing else is not checked. Any recognised producer counts: GoReleaser sboms:, anchore/sbom-action or CycloneDX actions, syft/cyclonedx/trivy commands, a Makefile sbom target the release workflow calls, a build-tool plugin, or docker/build-push-action with sbom: true. Repositories add producers with accept:.

Why

Consumers and scanners need to know what is inside an artifact; generating the SBOM in the pipeline ties it to the exact build.

Applies when

release.mechanisms.exists(m, m != "git-cliff") && tagged_workflows().size() > 0 && !(!file(".goreleaser.yaml") && !file(".goreleaser.yml")
     && tagged_workflows().exists(w, steps(w).exists(s, s.uses.startsWith("pypa/gh-action-pypi-publish")
          || s.run.matches("\\b((npm|pnpm|yarn( npm)?) publish|twine upload|(uv|poetry|flit|hatch) publish|cargo publish|gem push|(dart|flutter) pub publish|dotnet nuget push)\\b")))
     && !tagged_workflows().exists(w, steps(w).exists(s,
          s.uses.matches("^(softprops/action-gh-release|ncipollo/release-action|actions/upload-release-asset|svenstaro/upload-release-action|goreleaser/goreleaser-action|docker/build-push-action)@")
          || s.run.matches("\\b(gh release (create|upload)|goreleaser|docker (buildx )?(build|push)|podman push|ko (build|publish)|release-cli|glab release|tea releases? create)\\b"))))

Fix

Add an SBOM step to the tag-triggered release workflow (syft, SPDX JSON, one per artifact) or a sboms: section to .goreleaser.yaml, and upload the files with the release.

Agent instruction: In the tag-triggered release workflow add a step running syft on each artifact producing SPDX JSON files, and include them in the release upload step. Do not change other steps. If the repo uses GoReleaser, add a sboms: section instead.

See: https://fleetlint.org/baseline/#releases


Generated by fleetlint docs from catalog v0.1.0.