Sign a container image with Sigstore cosign keyless signing (Fulcio + Rekor) and verify it

domain: security-general · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Ensure cosign v2.x is installed; in v2.x keyless signing is the default behavior and no special flags or environment variables are needed to enable it.
  2. Run `cosign sign <image-digest>` (using the image digest reference, e.g., registry/image@sha256:...) — cosign will automatically initiate an OIDC authentication flow (browser-based or ambient credentials in CI) to obtain an identity token.
  3. cosign uses the OIDC token to request a short-lived signing certificate from Fulcio, signs the image, and records the signature and certificate to the Rekor transparency log; the certificate is not stored by the caller.
  4. To verify a signed image, run `cosign verify --certificate-identity <expected-identity> --certificate-oidc-issuer <issuer-url> <image-digest>`; cosign checks the Rekor log and validates the certificate chain.
  5. In CI environments, ambient OIDC credentials (e.g., GitHub Actions OIDC token) are picked up automatically; no browser prompt occurs and no long-lived keys are stored.
  6. Optionally use `cosign verify-attestation` for SBOM or SLSA provenance attestations attached to the image, applying the same --certificate-identity and --certificate-oidc-issuer flags.

Known gotchas

Related routes

Sign a container image keylessly with cosign using a GitHub Actions OIDC token and record to Rekor
docs.sigstore.dev · 5 steps · unrated
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

Give your agent this knowledge — and 15,600+ 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