Cosign, Sigstore, and the Verifiable Supply Chain
A hands-on tour of keyless signing with Fulcio, Rekor, and CT — signing and verifying images with cosign, attesting SBOMs, choosing between keyless and managed keys, and enforcing signatures in admission control.
Published on • November 15, 2026
AI Assistant

Signing container images has been “best practice” for a decade, and most teams still don’t do it — because long-lived signing keys are a operational nightmare: where do you store the private key, how do you rotate it, how do you distribute the public key, what do you do when it’s compromised? Sigstore reframes the problem from keys to identity, and cosign is the client that makes signing a container as easy as cosign sign --yes. This post is a practical tour: keyless signing end to end, verification, SBOM and provenance attestations, the key-management trade-offs, and how to enforce signatures at admission time.
Why Traditional Code Signing Fails at Container Speed
With conventional signing, the publisher keeps a private key and ships the public key to consumers. Three problems compound at container scale: identity (how do you know the key holder is really your CI system?), key management (a leaked signing key means forging images until every consumer updates), and revocation (distributing new keys in a way attackers can’t mimic). Containers are built hundreds of times a day across ephemeral CI runners — exactly the environment where a durable private key becomes a liability.
Sigstore’s answer, backed by the OpenSSF under the Linux Foundation, is ephemeral keys plus identity-based verification: your signing key exists for minutes, is bound to an identity you already trust (an OIDC subject), and every signing event is recorded in a public, tamper-resistant log.
Keyless Signing, End to End
Here is what happens when you run:
cosign sign --yes \
ghcr.io/acme/payments-api@sha256:6f1c...e9a2
- Cosign generates an ephemeral key pair in memory. The private key never touches disk in any durable way and is discarded after the signing session.
- Cosign obtains an OIDC identity token. Interactively, that’s a browser flow to Google, GitHub, Microsoft, or any OIDC provider. In CI, it comes from your platform — on GitHub Actions that’s the workflow’s
id-token: writepermission, yielding a token whose issuer ishttps://token.actions.githubusercontent.comand whose subject pins the repository and workflow. - Fulcio — the Sigstore certificate authority — issues a short-lived certificate (on the order of minutes) binding your ephemeral public key to that OIDC identity. Fulcio verifies the token itself; it never sees your private key. The certificate is logged to a Certificate Transparency log as part of the flow.
- Cosign signs the image digest and uploads the signature (plus certificate) to the registry as an OCI artifact; the signing event — digest, signature, certificate — is recorded in Rekor, Sigstore’s append-only transparency log.
- The private key is discarded. There is nothing to store, rotate, or revoke.
Verification then checks four things: the signature validates against the certificate’s public key, the certificate’s identity matches what you expect, the certificate chains to Sigstore’s trusted root, and the entry has a valid proof of inclusion in Rekor.
Verifying — and Pinning Identity
cosign verify \
--certificate-identity-regexp 'https://github.com/acme/payments-api/.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
ghcr.io/acme/payments-api@sha256:6f1c...e9a2
The identity flags are the heart of keyless verification: you’re no longer asking “does this match a public key I downloaded?” but “was this signed by a workflow in my repository?” That’s a strictly stronger statement. In CI environments without public OIDC (or for fully air-gapped setups), cosign verify can check signatures against a static public key instead — the identity checks simply drop away.
Two operational details worth knowing: transparency-log verification is on by default for public-good Sigstore deployments (you can disable it with --insecure-ignore-tlog in restricted environments), and long-term verification of old signatures benefits from cosign’s timestamp support (RFC 3161 timestamp authorities), since Fulcio certificates expire quickly and you still want to prove the signature was created while the certificate was valid.
SBOMs and Attestations
Signing proves who signed; attestations prove claims about the artifact. Cosign can attach in-toto attestations — structured statements about an image — directly to the registry:
# Generate an SBOM, then attest it
syft packages ghcr.io/acme/payments-api:2.3.1 -o spdx-json=/tmp/payments.spdx.json
cosign attest --yes \
--predicate /tmp/payments.spdx.json \
--type https://spdx.dev/Document \
ghcr.io/acme/payments-api@sha256:6f1c...e9a2
# SLSA build provenance
cosign attest --yes \
--predicate provenance.json \
--type https://slsa.dev/provenance/v1 \
ghcr.io/acme/payments-api@sha256:6f1c...e9a2
And verify them alongside the signature:
cosign verify-attestation \
--type https://spdx.dev/Document \
--certificate-identity-regexp 'https://github.com/acme/payments-api/.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
ghcr.io/acme/payments-api@sha256:6f1c...e9a2
Attestations ride the same Fulcio/Rekor machinery as signatures: the statement is wrapped in a DSSE envelope, signed with an ephemeral key, and logged. The --type corresponds to the attestation’s predicate type — SPDX or CycloneDX for SBOMs, SLSA provenance for build provenance, plus vulnerability (VEX) and test-result predicates. cosign attach sbom is the older, simpler way to shelve an SBOM next to an image; attestations are the verifiable, policy-friendly form.
Key Management Trade-offs
Keyless isn’t the only mode, and the right choice depends on your threat model:
| Keyless (Fulcio/Rekor) | Self-managed key (cosign generate-key-pair) | KMS/HSM-backed | |
|---|---|---|---|
| Private key storage | None (ephemeral) | Your secret store | Cloud KMS, Vault PKCS#11, hardware token |
| Rotation/revocation | Free (certs expire in minutes) | Manual, painful | Managed by provider, still manual policy |
| Verification | Identity + transparency log | Public key distribution | Public key or provider-mediated |
| Offline/air-gapped | Needs bundles/timestamps or a private deployment | Works offline | Works with local verification |
| Failure mode | Depend on public-good infra availability | Key leak = full compromise until rotated | Leak requires HSM-level attack |
Self-managed keys remain the pragmatic choice for air-gapped registries, and cosign makes the pain survivable with KMS integrations — awskms:///alias/my-key, gcpkms://, azurekms:// — so the private key never exists in your CI filesystem at all. Many organizations run both: keyless for public or partner-facing images, KMS-backed keys for regulated internal releases where an identity from a public OIDC provider isn’t the trust anchor their auditors want.
Registry Adoption
Signatures and attestations are stored as OCI artifacts, and registry support has matured around the OCI 1.1 referrers API — meaning the signature is referenced by the image manifest rather than jammed into a magic tag. GitHub Artifact Attestations, Google Artifact Registry, Amazon ECR, and Azure Container Registry all handle cosign payloads natively, and Chainguard, SUSE, and many base-image vendors now ship images signed by default. The legacy sha256-<digest>.sig tag scheme still exists for older registries; cosign handles both.
Enforcing Signatures with Policy
Verification only matters if something rejects unsigned images. In Kubernetes, two paths dominate:
Kyverno has first-class image verification. A ClusterPolicy with verifyImages pulls signatures and attestations at admission:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: verify-signatures
spec:
validationFailureAction: Enforce
rules:
- name: verify-cosign
match:
any:
- resources:
kinds: ["Pod"]
verifyImages:
- imageReferences:
- "ghcr.io/acme/*"
attestors:
- entries:
- keys:
certificates: |
-----BEGIN CERTIFICATE-----
... # Fulcio root CA
-----END CERTIFICATE-----
rekor:
url: https://rekor.sigstore.dev
The policy rejects pods whose images fail signature verification against the Fulcio root and Rekor inclusion proof — keyless verification without baking a single public key into the cluster. Sigstore’s own policy-controller offers the same capability with a CRD-oriented ClusterImagePolicy (and is the natural choice if you already run Sigstore’s stack). For OPA-based setups, teams typically wire cosign verify into an external data provider or admission webhook and express identity rules in Rego — less turnkey, but it fits existing Gatekeeper tooling.
The full loop — sign in CI with an ephemeral key, record in Rekor, verify identity at admission, fail the deploy when the identity doesn’t match — is what “verifiable supply chain” actually means in practice. You’re not distributing keys anymore; you’re distributing expectations.