<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh" -->

---
title: Signing and verifying container images with Cosign and...
description: Container image signing with Cosign and Sigstore binds an image to a trusted build identity so teams can verify, before deployment, that the artefact running...
canonical: https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Signing and verifying container images with Cosign and Sigstore | daily.dev
og:description: Container image signing with Cosign and Sigstore binds an image to a trusted build identity so teams can verify, before deployment, that the artefact running...
og:url: https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh
og:image: https://api.daily.dev/og/posts/py88L4cFh.png
og:image:alt: Signing and verifying container images with Cosign and Sigstore
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Signing and verifying container images with Cosign and Sigstore

**[Security Boulevard](https://daily.dev/sources/securityboulevard)** · 16 min read · 0 upvotes · 0 comments

## Summary

Container image signing with Cosign and Sigstore binds an image to a trusted build identity so teams can verify, before deployment, that the artefact running in production is exactly the one that was built and tested. The piece explains the difference between scanning and signing, the mechanics of keyless (OIDC-backed) versus key-based signing, why signatures must be tied to the immutable image digest rather than a mutable tag, and how attestations can carry provenance and SBOM data. It covers practical CI/CD signing patterns, admission-control verification with tools like Kyverno or Gatekeeper, common pitfalls (tag-based deployment, weak trust policies), and a phased rollout approach starting with critical workloads for smaller organisations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://securityboulevard.com/2026/09/signing-and-verifying-container-images-with-cosign-and-sigstore>

## Questions this post answers

### Should I sign a container image by tag or by digest with Cosign?

Always sign the image digest, not the tag. A tag like latest or app:1.2.3 is just a mutable pointer that can be repointed to different content without changing its name, while a digest is a cryptographic content address that changes whenever the image changes. Signing the digest ensures the artefact verified is the exact artefact deployed.

_Teams standardizing digest-based signing policies can track Cosign and Sigstore practices on daily.dev._

### What is the difference between keyless and key-based signing in Cosign?

Keyless signing uses a short-lived OIDC identity token issued during the CI build so Cosign signs with that identity instead of a stored private key, reducing key management overhead and fitting naturally with platforms like GitHub Actions, GitLab CI, or Azure DevOps. Key-based signing, including hardware-backed keys, is preferred when an organization needs explicit custody of signing material, has isolated build environments, or requires stricter separation of duties.

_Engineers deciding between signing approaches can compare trade-offs like this on daily.dev._

### How do I enforce container image signature verification in Kubernetes?

Use a policy engine such as Kyverno or Gatekeeper as an admission controller to reject unsigned images, checking the image digest, expected issuer, and expected subject or repository before allowing deployment. Production policies should be narrowly scoped to a small set of release identities, while development environments can allow broader trust for experimentation.

_Platform teams designing admission-control policies can follow supply chain security practices on daily.dev._

## Similar posts on daily.dev

- [Container Image Security \(Signing and Scanning with tools like Cosign, Trivy\)](https://daily.dev/posts/container-image-security-signing-and-scanning-with-tools-like-cosign-trivy--rtw86fjgm) · InfoSec Write-ups · 0 upvotes · 0 comments
- [Sign OCI containers & other artifacts using Sigstore Cosign & CircleCI OIDC tokens](https://daily.dev/posts/sign-oci-containers-other-artifacts-using-sigstore-cosign-circleci-oidc-tokens-dibffmehm) · CircleCI · 1 upvotes · 0 comments
- [Your container images are unsigned. In the AI era, that’s a ticking time bomb.](https://daily.dev/posts/your-container-images-are-unsigned-in-the-ai-era-that-s-a-ticking-time-bomb--cp7rfv8zj) · The New Stack · 0 upvotes · 0 comments
- [Signing is for the bad days](https://daily.dev/posts/signing-is-for-the-bad-days-x6tdcvkg1) · Andrew Nesbitt · 0 upvotes · 0 comments
- [Making the Most of Your Docker Hardened Images Enterprise Trial – Part 2](https://daily.dev/posts/making-the-most-of-your-docker-hardened-images-enterprise-trial-part-2-67ueaj5ym) · Docker · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#kubernetes](https://daily.dev/tags/kubernetes)

[View this post on daily.dev](https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Signing and verifying container images with Cosign and Sigstore","url":"https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh"},"datePublished":"2026-09-21T09:16:00.102Z","dateModified":"2026-09-21T09:16:27.278Z","description":"Container image signing with Cosign and Sigstore binds an image to a trusted build identity so teams can verify, before deployment, that the artefact running...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8fe9eeb967de205fd6743e2535f16178?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8fe9eeb967de205fd6743e2535f16178?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Security Boulevard","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Security Boulevard","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/3613c832180040de8d85bb29f74395be","url":"https://daily.dev/sources/securityboulevard"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,kubernetes","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Security Boulevard","item":"https://daily.dev/sources/securityboulevard"},{"@type":"ListItem","position":3,"name":"Signing and verifying container images with Cosign and Sigstore"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/signing-and-verifying-container-images-with-cosign-and-sigstore-py88l4cfh#faq","mainEntity":[{"@type":"Question","name":"Should I sign a container image by tag or by digest with Cosign?","acceptedAnswer":{"@type":"Answer","text":"Always sign the image digest, not the tag. A tag like latest or app:1.2.3 is just a mutable pointer that can be repointed to different content without changing its name, while a digest is a cryptographic content address that changes whenever the image changes. Signing the digest ensures the artefact verified is the exact artefact deployed. Teams standardizing digest-based signing policies can track Cosign and Sigstore practices on daily.dev."}},{"@type":"Question","name":"What is the difference between keyless and key-based signing in Cosign?","acceptedAnswer":{"@type":"Answer","text":"Keyless signing uses a short-lived OIDC identity token issued during the CI build so Cosign signs with that identity instead of a stored private key, reducing key management overhead and fitting naturally with platforms like GitHub Actions, GitLab CI, or Azure DevOps. Key-based signing, including hardware-backed keys, is preferred when an organization needs explicit custody of signing material, has isolated build environments, or requires stricter separation of duties. Engineers deciding between signing approaches can compare trade-offs like this on daily.dev."}},{"@type":"Question","name":"How do I enforce container image signature verification in Kubernetes?","acceptedAnswer":{"@type":"Answer","text":"Use a policy engine such as Kyverno or Gatekeeper as an admission controller to reject unsigned images, checking the image digest, expected issuer, and expected subject or repository before allowing deployment. Production policies should be narrowly scoped to a small set of release identities, while development environments can allow broader trust for experimentation. Platform teams designing admission-control policies can follow supply chain security practices on daily.dev."}}]}
```

