Self-hosted service
sigstore/cosign avatar
sigstore/cosign

Three places name the Go version and none agree, and the README flags its own air-gap section as out of date

Code signing and transparency for containers and binaries

6,440 stars842 forksGoApache-2.0

At a glance

What is it?
cosign signs OCI containers and other artifacts, defaulting to keyless signing through Fulcio and Rekor. The files disagree about versions in three places, run two release lines in parallel, and carry an air-gapped verification section the page itself marks as out of date.
Who is it for?
Use cosign when you want signatures to be verifiable by someone who was not in the room, and read the version story before you pin anything. Three numbers describe the Go requirement and they do not match, so a developer environment built to the readme's 1.22 will not match what the module declares.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • sigstore/cosign6,440 ★ · +118
Star history
Repository2026-09-232026-11-15
sigstore/cosign6.3k6.4k

118 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The air-gapped section opens by declaring itself out of date

The heading for offline verification is followed immediately by two notes, and the first of them reads that this section is out of date. The second is the substantive one: most verification workflows require periodically requesting service keys from a TUF repository, and for air-gapped verification against the public-good instance you need the trusted root file from the production TUF repository. What follows is the part that matters operationally. The contents of that file change without notification, so a copy taken today is not guaranteed to be current tomorrow, and a workflow that does not use TUF has to build its own mechanism for keeping the air-gapped copy up to date. The section then names the way out: cosign can verify a bundle completely offline, and that bundle is typically distributed as an annotation on the image manifest.

The Go version appears three times and the three values disagree

The developer installation section opens with a version requirement, then go.mod declares another, then the Dockerfile names a third. The readme asks for Go 1.22 or newer before it will set up a development environment. go.mod declares `go 1.27`. The Dockerfile builds `FROM golang:1.27.3`, and the comment above that line explains the arrangement: the Go version is scraped from the image and used in CI to get the latest Go version, with dependabot keeping it up to date. So the build image and the module declaration are a deliberate pair, and the readme's 1.22 is the odd one out. That matters beyond pedantry, because the developer path is four commands:

shell
$ git clone https://github.com/sigstore/cosign
$ cd cosign
$ go install ./cmd/cosign
$ $(go env GOPATH)/bin/cosign

Clone, change directory, install the command package, run the binary from the Go path's bin directory. Following the readme with an older toolchain means failing at the module line rather than at a compile error you can read.

Two release lines ship on the same day, and the example pins a v2 image

Three releases are recent enough to compare. v3.1.3 and v2.6.5 were both published on 2026-08-06, about twenty minutes apart and one major version apart in name, and v3.1.4 followed on 2026-10-20. Two lines are being maintained at once, which the contributing notes explain: cosign 2.x is called a stable release that will continue to receive periodic feature updates and bug fixes, and future development is focused on the next major release, the one based on sigstore-go. Maintainers say they will concentrate on feature development inside sigstore-go and would like contributions there, particularly around bring-your-own keys and signing, with a pointer to that repository's issue tracker for good first issues. Pull requests here that significantly modify or break the API will not be accepted. The readme's own Dockerfile example contradicts all of this by copying `ghcr.io/sigstore/cosign/cosign:v2.4.1`, a tag several point releases behind the stable line.

Sign by digest, and the sample verification output has an empty reference

The signing section warns, before showing any command, that images should always be signed by their digest rather than by a tag, because otherwise you may sign something you did not intend to. The public-key verification example does something else: it verifies `$IMAGE_URI:1h`, a reference carrying a tag suffix, and the sample output it prints begins with an identity block whose `docker-reference` value is an empty string. What follows in that output is the image manifest digest and the signature type, with a null optional section. The text explains the design: valid payloads go to stdout in json format, and those payloads include the digest of the container image, which is how a detached signature is tied to the right image. It also states that the command returns 0 when at least one cosign formatted signature matching the public key is found, and then refers the reader to the detailed usage below for other signature formats.

Keyless is the default, and the consent prompt names what it stores

Five signing modes are offered, and the first is marked as the default: keyless signing using the Sigstore public good Fulcio certificate authority and the Rekor transparency log. The others are hardware and KMS signing, a cosign generated encrypted key pair, container signing, verification and storage in an OCI registry, and bring-your-own PKI. The walkthrough for the default path prints two lines, one about generating ephemeral keys and one about retrieving a signed certificate, and after them comes the consent text a user has to agree to. It warns that there may be personally identifiable information associated with the signed artifact, that this may include the email address used to authenticate, and that the information will be stored in public transparency logs and cannot be removed later. Underneath, the flow is stated plainly: authenticate over OIDC, receive a code signing certificate from Fulcio whose subject matches the email, store signature and certificate in Rekor, upload the signature to the registry beside the image.

Verification takes an identity and an issuer, and the regexp flags are a second door

Verifying an image signed the default way requires two values the verifier already has to know: the expected certificate subject and the expected issuer.

code
cosign verify $IMAGE --certificate-identity=$IDENTITY --certificate-oidc-issuer=$OIDC_ISSUER

They are passed as `--certificate-identity` and `--certificate-oidc-issuer`. Alongside them sit `--certificate-identity-regexp` and `--certificate-oidc-issuer-regexp`, which accept patterns instead of exact strings. That is the whole trust decision in the default flow: nothing is trusted because the signature parses, it is trusted because the certificate subject matches the identity you expected and the issuer matches the one you expected. The dependency list supports the other modes the feature list advertises, with packages for AWS key management, a hardware token library, two PKCS11 implementations, and credential helpers for two container registries.

The Makefile can trace its own shell and computes version strings from git

The build file starts by checking whether an environment variable named DEBUG is empty. If it is not empty, the recipe shell is replaced with bash run under tracing, so every command a make target runs is echoed as it executes. A single variable, and the difference between a silent build and a diagnostic one. The rest of the header is about stamping: the go binary can be overridden, the install directory is detected from the Go environment in two branches, depending on whether GOBIN is set, and several link-time values have defaults meant to be replaced at release time. The project identifier defaults to projectsigstore, the runtime image to a distroless static base, and the tag to dirty-tag. Build dates come from the timestamp of the last commit, read through the git log, and formatted with a command that tries the GNU date first and falls back to the BSD spelling, so the file is written to work on either.

The visible dependency list mixes signing libraries with CI and test helpers

The require block at the top of the module file shows the shape of the tool. The Sigstore pieces are there in pairs: the signing library and the newer Go implementation, the transparency log client and a tiles client for it, plus the protobuf specifications. Around them sit the policy engine, the JOSE library, the in-toto attestation packages, a CUE module, the container registry client, the GitHub client, a throttler, word wrapping and number humanising helpers, and a prompt library. Two entries in the same block are not signing libraries at all: one is a CI agent library and one is named as a test dependency check. Their presence in the main require block rather than in a separate test block is the kind of detail that changes how you read a project's dependency surface.

Editorial conclusion

Use cosign when you want signatures to be verifiable by someone who was not in the room, and read the version story before you pin anything. Three numbers describe the Go requirement and they do not match, so a developer environment built to the readme's 1.22 will not match what the module declares. Two release lines are being published on the same day, v3.1.3 and v2.6.5 both dated 2026-08-06, while the Dockerfile example in the readme still copies a v2.4.1 image, so decide which line you are on before you copy that snippet. The section on air-gapped verification carries its own out of date warning and tells you to keep a trusted root current by hand if you are not using TUF; take that seriously, because the contents of that file change without notice. Everything else in the flow is explicit about what it puts in public logs, including an email address that cannot be removed later.

Frequently asked questions

how to install cosign

Package managers and platforms are covered by the installation docs for Homebrew, Arch, Nix, a GitHub Action and Kubernetes. For Linux, macOS and Windows the readme points at the GitHub release assets, and warns against the project's own storage bucket, which carries a July 31, 2023 deprecation notice.

how to use cosign

The quick start signs an image and verifies it in two steps. `cosign sign $IMAGE` runs keyless signing by default, authenticating over OIDC and storing the certificate and signature in the Rekor transparency log, and `cosign verify` then needs the expected certificate identity and issuer, or their regexp forms.

Does cosign verification work without a network connection?

Yes, by verifying a bundle, which is typically distributed as an annotation on the image manifest. The readme marks its own air-gapped section as out of date and warns that the trusted root file changes without notification, so a copy kept by hand can go stale; without TUF you have to keep it current yourself.

What personal information does a default cosign signature publish?

The consent prompt says the signed artifact may carry personally identifiable information, including the email address used to authenticate, and that it will be stored in public transparency logs and cannot be removed later. The certificate subject matches the email you signed in with, and the certificate comes from Fulcio while the signature and certificate go to Rekor.

Is cosign 2.x or 3.x the line to build against?

Both are being published: v3.1.3 and v2.6.5 share the date 2026-08-06. The contributing notes call 2.x stable with periodic updates and say future work is focused on the next major release based on sigstore-go, and the module path itself carries a v3 suffix.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. sigstore/cosign on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sigstore-cosign.svg)](https://hysenlabs.com/projects/sigstore-cosign)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sigstore-cosign.svg)](https://hysenlabs.com/projects/sigstore-cosign)

Was this useful?