Glossary · Policy, pipelines and supply chain

Image signing (Sigstore and cosign)

Container image signing attaches a cryptographic signature to an image's digest so that anyone deploying it can check who published those exact bytes. Sigstore is an open-source project for this, and cosign is its signing tool for containers.

A signature is made over an image's digest, the hash of its manifest, never over a tag, because a tag can be moved to different content. With cosign, signatures are stored in the registry beside the image as OCI artifacts that reference its digest, so no separate distribution channel is needed. Cosign supports classic signing with a long-lived key pair, and keyless signing through Sigstore: the signer proves its identity with an OIDC token (from a CI system's workload identity, for example), Sigstore's Fulcio certificate authority issues a short-lived certificate naming that identity, the signature is made, and the event is recorded in Sigstore's public Rekor transparency log. Nothing long-lived needs protecting. The same mechanism can sign attestations, such as an SBOM or a description of how the image was built.

How it is used in practice

Publishers sign each image as the last step of their release pipeline. Consumers verify before deploying, either by running cosign verify with the expected identity (for keyless, the repository and workflow that should have signed it), or automatically through an admission controller policy that refuses unsigned images or images signed by anyone else. Verification against a digest proves that the bytes about to run are the bytes the named identity published.

Common pitfalls

  • Verifying the signature but not the identity. Any valid Sigstore certificate verifies; the check that matters is that the certificate names the expected repository and workflow.
  • Signing tags. A signature checked against a tag that has since moved proves nothing about the image you pull.
  • Signing without anyone verifying. If no deploy step checks, signing is ceremony.
  • Treating a signature as a clean bill. A signature proves who published an image, not that it is free of vulnerabilities. Scan it as well.
  • Digest churn. Build tools that attach extra metadata can change an image's digest after signing; sign the digest that was actually published.

How TrustIvan relates to it

TrustIvan works with signatures in two directions, with different limits. Images you scan: a container image scan looks for the cosign signatures and attestations published beside the image and checks key-based ones (made with cosign sign --key) against the public keys your policies list, and a signed_by policy rule then fails or warns on an image not signed by one of up to ten trusted keys. A registry it cannot read fails the rule rather than letting the image through. Keyless signatures are detected but reported as not verified; the Sigstore bundle format cosign 3 writes by default is not found; there is no transparency-log check, no key expiry or revocation and no Notation support; and the check runs at scan time only. TrustIvan's own releases are signed keylessly through GitHub Actions' OIDC identity and carry a signed CycloneDX SBOM; because keyless signatures are outside what the product checks, verify those with the cosign verify commands in the docs. See Image signature verification and Supply chain security.

Related terms

Guides on Image signing

All glossary terms

See TrustIvan on your own estate.

Book thirty minutes with an engineer and bring an image, a repository or a cloud account, or start free on the hosted service.