release/signing/image
Release artifacts are signed
Implements release/signing for the image artifact: it runs when the release publishes one (see artifacts).
| Severity | error |
| Tiers | 1 |
| Artifact | image |
| Scope | root |
| Kind | outcome |
| Source | library v0.7.0 |
| Selected by | fleetlint-recommended@v0.7.0 |
Requirement
The workflow that pushes the image signs it by digest (cosign sign <image>@<digest>, the digest from the build step’s output), with GoReleaser docker_signs:, or with Notation. Signing by tag is a partial: a tag can be moved after signing.
Why
Checksums prove integrity; only a signature proves who built it.
Capability applies when
release.exists || repo.artifacts.size() > 0Fix
After the push step run cosign sign --yes ${IMAGE}@${{ steps.build.outputs.digest }} with id-token: write on the job (keyless) or --key on Gitea.
Agent instruction: Add sigstore/cosign-installer and, after the build-push step with an id, cosign sign --yes <registry>/<image>@${{ steps.<id>.outputs.digest }}; grant id-token: write and packages: write to that job only.
A finding of this rule points at the file artifact.workflows.size() > 0 ? artifact.workflows[0] : ".github/workflows/release.yml" yields.
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)
- https://goreleaser.com/customization/docker_sign/ (spec)
Generated by fleetlint docs from catalog v0.7.0.