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

release/sbom/dotnet

Releases publish an SBOM

Implements release/sbom for dotnet.

Severitywarning
Tiers1
Stacksdotnet
Scoperoot
Kindoutcome
Sourcelibrary v0.2.0
Selected byfleetlint-recommended@v0.2.0

Requirement

The release runs the CycloneDX .NET tool (dotnet CycloneDX); or a stack-neutral producer such as Microsoft’s sbom-tool.

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.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

Install CycloneDX as a dotnet tool and run dotnet CycloneDX <solution> -o sbom in the release workflow.

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, https://fleetlint.org/stacks/#net


Generated by fleetlint docs from catalog v0.2.0.