Unsigned build artifacts: signing and verifying with Sigstore cosign
Without signatures, a deploy cannot tell your image from a replaced one. How keyless signing with cosign works, how to verify identity and issuer at deploy time, and how admission policies enforce it.
Diagram
Sign in CI, verify at deploy
Step 1 of 4
Build
CI pushes an image and records its digest.
registry.example.test/shop/api@sha256:4b9f...e21c
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Verify the identity
- What fails
- A valid signature from anyone is not enough.
- Who is affected
- Clusters that accept any signer.
- What you would notice
- Verification without identity and issuer checks.
- What you change
- Pin the workflow identity and issuer.
Sign digests
- What fails
- Tags can move; digests cannot.
- Who is affected
- Deploys that resolve tags at runtime.
- What you would notice
- Signing or deploying by tag only.
- What you change
- Sign and deploy by digest.
Enforce, do not advise
- What fails
- Verification that only logs does not stop anything.
- Who is affected
- Production.
- What you would notice
- Policies in audit mode for months.
- What you change
- Move to enforce after a short audit period.
Keyless versus keys
Keyless signing uses a short-lived certificate tied to the CI identity and records it in the Rekor transparency log, so there is no long-lived private key to steal. Key-based signing still works for offline environments; store those keys in a KMS or HSM.
Check yourself
Recognition and the fix. Nothing here is a procedure.
Why check certificate identity during verification?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.
This page stands on its own. The lab and the glossary card are the next reading.