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
- Software supply chain security Software supply chain security is the discipline of protecting everything that goes into producing and delivering software, including third-party dependencies, source repositories, build systems, artifacts and the path they take to production.
- SBOM (software bill of materials) A software bill of materials (SBOM) is a structured, machine-readable inventory of the packages, libraries and other components that make up a piece of software, with their versions and identifiers.
- Admission control (Kubernetes) Admission control is the stage of the Kubernetes API server that intercepts a request to create or change an object, after authentication and authorization, and can accept, modify or reject it before it is stored.
- Container image scanning Container image scanning analyzes the contents of a container image, its operating-system packages, language dependencies and configuration, for known vulnerabilities and other security issues, before or after the image is deployed.
- Machine identity A machine identity is the cryptographic credential, such as an X.509 certificate, an SSH key or a signed workload token, that a device, server, container or service uses to prove what it is to other systems.
Guides on Image signing
- Container Vulnerability Management: From Scan to Verdict How container vulnerability management works end to end: a finding identity that survives rescans, a lifecycle, and a policy verdict a pipeline can act on.
- How to Prioritize Container Vulnerabilities with EPSS and KEV CVSS says how bad a vulnerability would be; EPSS and CISA KEV say whether anyone is exploiting it. How to join all three into one container fix order.
- Writing a VEX Statement: When "Not Affected" Is Defensible How to write an OpenVEX statement, what each not_affected justification needs as evidence, and the claims that look like VEX but are really risk acceptance.