What Is Container Image Signing? Verify Digests and Enforce Deployment Policy
Explains what image signatures prove, key-based and keyless signing, Cosign verification, registry storage, and why verification alone does not enforce deployment policy.
What Is Container Image Signing? Verify Digests and Enforce Deployment Policy
Container image signing attaches cryptographic evidence that a signer approved specific image content. A signature usually targets the image manifest digest rather than a mutable tag. Verification must therefore check both the signature and whether its signed digest is the image you intend to deploy. A successful signature check does not by itself prove an image is safe or enforce a deployment rule.
What a signature proves—and what it does not
A signer creates a digital signature with a private key. A verifier uses the matching public key or a trusted certificate system to check that the signed content has not changed and that the signer meets the configured trust criteria. Since an image manifest points to configuration and layer blobs, binding the signature to its digest identifies a particular image version. If a tag later moves to another digest, the old signature does not approve the new content.
Verification can establish a cryptographic relationship between the signature and content and help determine whether the signer is trusted under your policy. It does not prove the image has no vulnerabilities, that its build was correct, or that deployment will automatically be blocked. To evaluate build origin or materials, create and verify a separate attestation such as provenance under an explicit policy.
Key-based versus keyless signing
Key-based signing uses an organization-managed key pair. The organization distributes the trusted public key and manages backup, access, rotation, revocation, and trust distribution. A private key exposed on a developer workstation or in CI logs undermines trust in the signatures. Prefer a KMS or protected credential store and limit who can use the key.
Keyless signing in Sigstore links an OIDC-authenticated identity to an ephemeral key. Fulcio issues a short-lived certificate binding that key to the identity, and Rekor records the signing event in a transparency log. This avoids distributing a long-lived private key, but the verifier must specify the allowed certificate identity and OIDC issuer precisely. Broad trust conditions can accept signatures from unintended workflows.
Sign and verify with Cosign
The following are examples in Sigstore’s documented format. Prerequisites are Cosign, registry access, and an organization-approved signing method and trust policy. Using the manifest digest in IMAGE helps avoid ambiguity from a movable tag. These commands were not executed in this environment.
For keyless signing, authenticate through OIDC first:
cosign sign "$IMAGE"
cosign verify "$IMAGE" --certificate-identity="ci@example.com" --certificate-oidc-issuer="https://accounts.example.com"For key-based signing, protect the key pair and distribute the public key through a trusted channel:
cosign sign --key cosign.key "$IMAGE"
cosign verify --key cosign.pub "$IMAGE"Check the command’s exit status and output, including that the digest and the expected key or keyless identity and issuer match. The email and issuer above are placeholders. Narrow the real CI identity to the intended repository, branch, workflow, and OIDC configuration. CLI options and supported identity providers can change; check the official docs for the installed version before adoption.
If verification fails, check in order: (1) the image reference exists and registry login works; (2) the signer signed that digest; (3) the public key or certificate identity and issuer match the expected trust; and (4) the registry retains and returns the signature artifact. Do not deploy another tag or digest just because a verification command succeeded for one reference.
Where signatures live, and how to enforce policy
Cosign documents attaching container signatures and certificates to images through OCI 1.1 referrers, and using cosign tree to find attached signatures. The OCI Distribution Specification’s referrers API discovers artifacts associated with an image manifest digest. Registry support and compatibility vary, and some services do not support signature deletion. Confirm the target registry’s signature storage, discovery, and recovery behavior.
Running cosign verify in CI produces a verification result. To require verification before an image runs, configure a separate pipeline failure condition or cluster admission policy. State the permitted signer identity and issuer, digest, and any required attestation conditions; then verify that rejection actually stops deployment. Decide whether missing or undiscoverable signature artifacts should fail open or fail closed.
Commonly confused controls
| Control | Question it answers | Relationship to signing |
|---|---|---|
| Image digest | Which exact content is this? | Identifies the version a signature targets |
| Image signature | Who approved this digest, and is the signature valid? | Cryptographic approval evidence |
| Attestation / provenance | What build process, materials, or claims produced it? | Verified separately using a statement format and policy |
| Vulnerability scan | Are known vulnerabilities reported? | Not replaced by a signature |
| Admission policy | Does an unqualified deployment get blocked? | Separate control that enforces verification at deploy time |
Summary
Image signing is a supply-chain control that verifies the relationship between a specific digest and a signer. Key-based signing requires key lifecycle management; keyless signing requires precise OIDC identity and issuer policy. Running a verification command and blocking deployment are separate steps, so validate both registry artifact support and CI or admission-policy failure behavior.
Sources
[Sigstore Cosign: Signing containers](https://docs.sigstore.dev/cosign/signing/signing_with_containers/)
[Sigstore Cosign: Verifying signatures](https://docs.sigstore.dev/cosign/verifying/verify/)
[Sigstore: Keyless signing overview](https://docs.sigstore.dev/cosign/signing/overview/)
[OCI Distribution Specification: Referrers API](https://github.com/opencontainers/distribution-spec/blob/main/spec.md)
[OCI image format](https://knowledge.linkspot.net/ko/articles/ab92d35f-73b7-4a7f-8165-21a86c3f1180)
[Container registry](https://knowledge.linkspot.net/ko/articles/efcf4867-4816-48ab-bec2-5e5213cdea6b)
Scope: based on official Sigstore Cosign and OCI Distribution documentation checked 2026-11-22. Registry compatibility, identity providers, CLI options, and policy engines vary by version.