Sign a container image keylessly with Cosign 2.x in a CI/CD pipeline

domain: docs.sigstore.dev · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install Cosign 2.x (e.g., via `brew install cosign` or the GitHub releases binary).
  2. In a CI environment with OIDC support (GitHub Actions, GitLab CI, Google Cloud Build), run `cosign sign <image-ref>` with no additional flags — keyless signing is the default behavior in Cosign 2.x.
  3. Cosign will automatically obtain a short-lived Fulcio certificate using the CI job's OIDC token; the signature and certificate are uploaded to the Rekor transparency log.
  4. To suppress transparency log upload (e.g., for private images), add `--tlog-upload=false`; the signature is still stored in the OCI registry.
  5. Verify the signature with `cosign verify --certificate-identity <CI-job-identity> --certificate-oidc-issuer <oidc-issuer-url> <image-ref>`.

Known gotchas

Related routes

Sign a container image keylessly with cosign and attach the signature to the registry using the cosign sign command
sigstore.dev · 5 steps · unrated
Sign a container image keylessly with cosign and Sigstore using GitHub Actions OIDC
docs.sigstore.dev/cosign/signing · 6 steps · unrated
Sign container images with a cloud KMS-backed key (not keyless Fulcio signing) using cosign and verify against that key in a deploy pipeline
docs.sigstore.dev · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans