Sigstore Package Signing: The Written Version
Think of this as the transcript-style companion to a short explainer on signing release artefacts with Sigstore. No recording accompanies it; each chapter is meant to be read in a couple of minutes. The goal is to understand what "keyless" signing really means and to sign and verify one file yourself.
Chapter 1: The problem with signing keys
Classic artefact signing relies on a long-lived private key. Someone has to generate it, store it safely, rotate it and revoke it if it leaks. In practice, many small projects never sign anything because that key management is a chore, and the ones that do often keep the key somewhere less safe than they would like. Users, meanwhile, rarely know which public key to trust in the first place.
Chapter 2: What "keyless" actually means
Sigstore, a project under the Open Source Security Foundation, replaces the long-lived key with an identity you already have. The flow, simplified:
- The signer proves an identity through OpenID Connect: a developer account login, or a CI workflow's built-in identity token.
- Fulcio, Sigstore's certificate authority, issues a certificate valid for only a few minutes, binding a freshly generated key pair to that identity.
- The artefact is signed with that ephemeral key, and the key is thrown away.
- The signature and certificate are recorded in Rekor, a public, append-only transparency log, which shows the signature existed while the certificate was valid.
So "keyless" does not mean there is no key. It means there is no key you have to look after.
Chapter 3: Signing a release file in CI
For a generic artefact such as a release tarball, the cosign command-line tool from the Sigstore project can sign a blob and write a bundle containing the signature, certificate and log entry. In a CI workflow with OIDC token permissions, it picks up the workflow identity automatically.
# inside a CI job that can request an OIDC token
cosign sign-blob dist/package-a-1.4.0.tar.gz \
--bundle package-a-1.4.0.sigstore.json
Attach the bundle to the release alongside the artefact. Check the cosign documentation for the flags in your installed version, as the CLI has evolved over time.
Chapter 4: Verifying, which is the part that matters
A signature is only useful if someone checks it, and checking means stating whose identity you expect. Verifying "signed by anyone" proves nothing.
cosign verify-blob dist/package-a-1.4.0.tar.gz \
--bundle package-a-1.4.0.sigstore.json \
--certificate-identity-regexp '^https://github.com/example-org/package-a/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
The identity and issuer pin the signature to one repository's workflows. If someone signs a lookalike file from a different repository, verification fails.
Chapter 5: Where registries already do this for you
You may not need cosign at all for registry packages. npm provenance and PyPI's attestations both use Sigstore under the hood, so publishing from CI with the right settings gives you signed provenance without handling bundles yourself. Manual signing is most useful for artefacts outside a registry: release binaries, container images, or downloadable archives.
Chapter 6: Limits to keep in mind
A valid signature proves who signed and when, not that the content is good. It also depends on the signing identity staying uncompromised: anyone who can push to the workflow can produce valid signatures. Protect release workflows with branch rules and required reviews, and the signature becomes a meaningful statement.