Package · Artifact signing
Cosign (Sigstore)
Cosign signs OCI artifacts with keys or keyless (OIDC identities via Fulcio and Rekor) and verifies signatures at deploy time, enabling admission policies that only run trusted images.
On this page
What it does
Stores signatures and attestations alongside images in the registry; verification checks the signature against a key or an identity.
Where it fits
Package stage after the image is pushed; Protect stage where Kyverno verifyImages enforces signatures.
Quick start
cosign sign --yes registry.example.com/app@sha256:… # keyless in CI with OIDC
cosign attach sbom --sbom app.cdx.json registry.example.com/app@sha256:…
cosign verify --certificate-identity-regexp 'https://gitlab.com/example/.*' --certificate-oidc-issuer https://gitlab.com registry.example.com/app@sha256:…
Common pitfalls
- Signing tags instead of digests; a tag can be moved after signing.
- Verifying only that a signature exists rather than whose — always constrain the identity.
On this site
- Sign and Verify Container Images with Cosign and Attestations and Provenance in the Software Supply Chain Security path.
Articles about Cosign (Sigstore)
Attestations and Provenance: Binding the SBOM to the Image
Turn the SBOM from part 2 into a Cosign attestation bound to the image digest, verify it and read the predicate back, list what hangs off an image with cosign tree, and see what SLSA build provenance adds.
Sign and Verify Container Images with Cosign
Cosign with a key pair against a local registry: why the digest is the identity; signing and verifying; a moved tag failing verification while the digest passes; keyless signing as configuration; where the check goes.
Understanding the Software Supply Chain
The delivery chain from source through dependencies, build, artifact, image, registry and deployment; where each link can be compromised; and the control for each, from lockfiles and SBOMs to signing by digest.