TExcelTAD
Home › Release Engineering & CI/CD › Signing Releases

Signing Releases

A checksum proves a download wasn't corrupted. A signature proves who published it: only the holder of a private key can produce a signature that verifies against the matching public key. Signing is a large topic of its own, with key management, transparency logs and build provenance; it is covered in depth in Software Supply Chain Security. This lesson gives the release engineer's overview: what to sign, the common tools, and one real signing session.

What gets signed

Object Why Typical tool
The checksum file (SHA256SUMS) one signature covers every artifact; users verify the signature, then the checksums GPG, minisign, cosign sign-blob, SSH signatures
Individual artifacts some ecosystems expect a signature per file GPG (.asc next to each file, Maven Central), cosign
Release tags proves the tag (and so the source) came from a maintainer git tag -s (GPG, SSH or X.509 keys)
Commits proves authorship of each change git commit -S; hosting shows "Verified"
Container images proves the image digest came from your pipeline cosign, Notation
Packages the OS or store verifies before installing .deb repositories (signed Release files), RPM (rpm --addsign), Windows Authenticode, Apple codesign + notarisation, Android APK signing
Build provenance proves how and from which commit the artifact was built (SLSA) GitHub artifact attestations, slsa-github-generator, in-toto

A real session: sign and verify the checksum list

The openssl command can create an Ed25519 key pair and sign a file. The flow is the same with any tool: the publisher signs SHA256SUMS with the private key; the user verifies the signature with the published public key, and then the checksums:

bash · try it yourself
mkdir -p release && cd release
echo "tad 1.4.2 for linux" > tad-1.4.2-linux-x86_64.tar.gz
echo "tad 1.4.2 for macos" > tad-1.4.2-macos-arm64.zip
sha256sum tad-1.4.2-* > SHA256SUMS

# publisher, once: a key pair (the private key stays in the CI secret store)
openssl genpkey -algorithm ed25519 -out release-key.pem
openssl pkey -in release-key.pem -pubout -out release-key.pub
# publisher, per release: sign the checksum list
openssl pkeyutl -sign -inkey release-key.pem -rawin -in SHA256SUMS -out SHA256SUMS.sig
echo "signature: $(wc -c < SHA256SUMS.sig) bytes"

# user: verify the signature, then the checksums
verify() {
  openssl pkeyutl -verify -pubin -inkey release-key.pub -rawin -in SHA256SUMS -sigfile SHA256SUMS.sig \
    && sha256sum -c SHA256SUMS
}
verify
echo "--- an attacker replaces an artifact and regenerates SHA256SUMS"
echo "tad 1.4.2 with a backdoor" > tad-1.4.2-linux-x86_64.tar.gz
sha256sum tad-1.4.2-* > SHA256SUMS
verify; echo "exit code: $?"
signature: 64 bytes
Signature Verified Successfully
tad-1.4.2-linux-x86_64.tar.gz: OK
tad-1.4.2-macos-arm64.zip: OK
--- an attacker replaces an artifact and regenerates SHA256SUMS
Signature Verification Failure
exit code: 1

The attacker could recompute the checksums, but not the signature: verification fails before any checksum is trusted. The whole scheme now rests on two things the session can't show: the private key stays secret (it lives in a secret store or an HSM, not in the repository), and users get the public key through a trusted channel (the project website, a keyserver, a key pinned in an installer) rather than from the same server as the downloads.

Choosing a tool

Tool Keys Strengths Watch out for
GPG (gpg --detach-sign --armor) long-lived key pairs universal; Maven Central and Linux distributions require it key distribution and rotation are hard; few users actually verify
minisign / signify small Ed25519 keys tiny, simple, used by Zig and OpenBSD no ecosystem integration
SSH signatures (ssh-keygen -Y sign, git tag -s with gpg.format=ssh) your existing SSH key no new key infrastructure; GitHub verifies them an allowed_signers file is needed to verify
Sigstore cosign (cosign sign-blob, cosign sign) keyless: short-lived certificates bound to a CI identity via OIDC, recorded in the Rekor transparency log no long-lived secret to leak; verification says "built by this workflow in this repository" depends on Sigstore's public services (or your own deployment)
GitHub artifact attestations (actions/attest-build-provenance) Sigstore under the hood provenance (which workflow, which commit) with one step; gh attestation verify checks it GitHub-specific
Platform code signing (Authenticode, Apple, Android) certificates from the platform or a CA required for installers and stores to run without warnings certificates cost money and expire; keep them in an HSM or a signing service

For a new project on GitHub, keyless signing with Sigstore or artifact attestations from the release workflow is the low-maintenance default; add GPG only where an ecosystem requires it. The release workflow lesson shows where the signing step sits, and Software Supply Chain Security teaches cosign, Rekor, SLSA provenance and verification in practice.

Signed tags

A signed annotated tag is the source-side counterpart of a signed artifact. It is one flag more than git tag -a, once a signing key is configured (non-run; the course image has no GPG or SSH key tools):

bash
git config --global gpg.format ssh                       # or openpgp (default), x509
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git tag -s v1.4.2 -m "Release 1.4.2"                     # -s = signed annotated tag
git tag -v v1.4.2                                        # verify (needs gpg.ssh.allowedSignersFile for SSH)

When CI creates the tag (semantic-release, changesets), the tag is signed by the CI identity, or not at all; GitHub's API-created tags and commits can be signed by GitHub itself. Decide which identity your users should trust and document it.

Test yourself

Why sign SHA256SUMS instead of each artifact?

  1. Signatures can't cover binary files
  2. One signature then covers every artifact listed in it
  3. It is faster to download
  4. Checksums are secret

An attacker replaces an artifact and regenerates SHA256SUMS on the download server. What stops them?

  1. sha256sum -c
  2. The signature on SHA256SUMS no longer verifies with the publisher's public key
  3. HTTPS
  4. The file name

What is the main advantage of keyless signing with Sigstore in CI?

  1. It needs no network
  2. There is no long-lived private key to steal; signatures bind to the CI identity and are logged publicly
  3. It works only for containers
  4. It replaces checksums