release/sbom/oci-artifact
Releases publish an SBOM
Implements release/sbom for the oci-artifact artifact: it runs when the release publishes one (see artifacts).
| Severity | warning |
| Tiers | 1 |
| Artifact | oci-artifact |
| Scope | root |
| Kind | outcome |
| Source | library v0.3.1 |
| Selected by | fleetlint-recommended@v0.3.1 |
Requirement
An SBOM of what went into the artifact is attached to its digest: cosign attest --type spdx|cyclonedx or cosign attach sbom, or oras attach --artifact-type with an SPDX or CycloneDX media type. An artifact built from a repository tree has the repository’s dependency SBOM (syft dir:.); one built from nothing but data states that in its annotations.
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
Generate the SBOM with syft (syft dir:. -o spdx-json > sbom.spdx.json) and attach it: cosign attest --yes --type spdxjson --predicate sbom.spdx.json <repository>@<digest>.
Agent instruction: Add anchore/sbom-action (or syft dir:.) before the push step and cosign attest --yes --type spdxjson --predicate <sbom> <repository>@${{ steps.<id>.outputs.digest }} after it.
See: https://fleetlint.org/baseline/#releases, https://oras.land/docs/how_to_guides/manifest_config/
Generated by fleetlint docs from catalog v0.3.1.