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.3.1 |
| Selected by | fleetlint-recommended@v0.3.1 |
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.
See: https://fleetlint.org/baseline/#releases, https://docs.sigstore.dev/cosign/signing/signing_with_containers/
Generated by fleetlint docs from catalog v0.3.1.