ghtier
← SBOM, signing and provenance

Cosign

Signs and verifies container images, blobs and attestations with Sigstore, without keys to manage.

github.com/sigstore/cosign ↗
Stars
★ 6,401
License
Apache-2.0
Language
Go
Latest release
v3.1.4 · 20 Oct 2026
Last push
29 Oct 2026
OpenSSF Scorecard
8.4 / 10
ghtier ratingRated 5 of 5, Top pick5/5 · Top pick

The standard for signing container images and blobs, keyless from a GitHub Actions OIDC token.

Note: this page is AI generated. Read the tool's own repository and documentation, linked at the bottom, before you rely on it.

How it works

In keyless mode cosign creates a short-lived key pair, sends the job's OIDC token to Sigstore's Fulcio certificate authority, and gets a certificate that names the workflow, repository and ref that ran. It signs the image digest and records the signature in the Rekor transparency log.

The signature, and any attestation such as an SBOM or SLSA provenance, is stored in the OCI registry next to the image. cosign verify checks the certificate identity and issuer you expect, the signature and the Rekor entry.

It can also sign with a key pair or a cloud KMS key when keyless signing is not an option.

What it catches

  • Images whose tag was moved to a digest your pipeline did not sign
  • Artifacts built outside the workflow and repository you expect
  • Unsigned images, once verification is enforced at deploy time
  • Tampered SBOMs and attestations

Run it

brew install cosign
cosign verify \
  --certificate-identity-regexp '^https://github.com/my-org/my-repo/' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/my-org/my-repo@sha256:...

In GitHub Actions

sign:
  runs-on: ubuntu-latest
  permissions:
    contents: read
    packages: write
    id-token: write
  steps:
    - uses: sigstore/cosign-installer@<sha> # v4.1.2
    - run: cosign sign --yes "ghcr.io/${{ github.repository }}@${DIGEST}"
      env:
        DIGEST: ${{ needs.build.outputs.digest }}

What leaves your machine

Keyless signing calls Fulcio and Rekor (sigstore.dev) and pushes the signature to your registry. Verification reads the registry and Sigstore's trust root.

Limits

  • Signing proves where an image was built only if something checks it. Enforce verification at deploy time, for example with an admission controller.
  • Keyless signing needs id-token: write on the job, and the certificate identity is public in Rekor.
  • A verify policy that only checks the issuer accepts any repository's workflow. Pin the certificate identity to your repository and workflow.

Related tools

GitHub stats as of 30 Oct 2026. How ratings work.