release/signing/oci-artifact
Release artifacts are signed
Implements release/signing for the oci-artifact artifact: it runs when the release publishes one (see artifacts).
| Severity | error |
| Tiers | 1 |
| Artifact | oci-artifact |
| Scope | root |
| Kind | outcome |
| Source | library v0.8.0 |
| Selected by | fleetlint-recommended@v0.8.0 |
Requirement
The workflow that pushes the artifact signs it by digest (cosign sign <repository>@<digest>, the digest from the push step’s output; oras push prints it and --format go-template extracts it), or with Notation. Signing by tag is a partial: a tag can be moved after signing. A consumer pins the digest or verifies the signature against the publishing workflow’s identity.
Why
Checksums prove integrity; only a signature proves who built it.
Capability applies when
release.exists || repo.artifacts.size() > 0Fix
Capture the digest of oras push (for example --format go-template='{{.digest}}') and run cosign sign --yes <repository>@<digest> with id-token: write on the job (keyless) or --key on Gitea.
Agent instruction: Add sigstore/cosign-installer; have the push step write the digest to $GITHUB_OUTPUT; after it run cosign sign --yes <registry>/<repository>@${{ steps.<id>.outputs.digest }}; grant id-token: write and packages: write to that job only.
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.2.1: Make software integrity verification information available to software acquirers)
- https://github.com/ossf/scorecard/blob/main/docs/checks.md (standard, Signed-Releases)
- https://fleetlint.org/baseline/#releases
- https://docs.sigstore.dev/cosign/signing/signing_with_containers/ (spec)
Generated by fleetlint docs from catalog v0.8.0.