This repository uses Cosign to sign release artifacts, providing cryptographic verification of their authenticity and integrity.
All release artifacts are signed using Cosign:
go-build-all.tar.gzandgo-build-all.zip(combined builds)- Individual platform builds in
per-os/directory - Corresponding
.sigsignature files are generated for each artifact
Install Cosign:
# Using Homebrew (macOS)
brew install cosign
# Using Go
go install github.com/sigstore/cosign/v2/cmd/cosign@latest
# Or download from releases
# https://github.com/sigstore/cosign/releases-
Download the artifacts and signature files from the GitHub release or workflow artifacts
-
Download the public key (
cosign.pub) from the GitHub release artifacts or from this repository -
Verify a signature:
# Verify a specific artifact cosign verify-blob --key cosign.pub --signature go-build-all.tar.gz.sig go-build-all.tar.gz # Verify all artifacts in current directory for f in *.tar.gz *.zip; do if [ -f "$f.sig" ]; then echo "Verifying $f..." cosign verify-blob --key cosign.pub --signature "$f.sig" "$f" fi done
A successful verification will output:
Verified OK
If verification fails, cosign will exit with a non-zero status and provide an error message.
- File:
cosign.pub(available in release artifacts) - Algorithm: ECDSA P-256
- Purpose: Verifying release artifact signatures
- Source: Generated from the repository's
COSIGN_PRIVATE_KEYsecret
- Always verify signatures before using release artifacts in production
- The public key is included with each release to ensure you have the correct key
- You can also find a copy of the current public key in this repository
- If verification fails, do not use the artifact as it may have been tampered with
- Report any signature verification failures as potential security issues
You can integrate signature verification into your deployment scripts:
#!/bin/bash
set -euo pipefail
ARTIFACT="go-build-all.tar.gz"
SIGNATURE="go-build-all.tar.gz.sig"
PUBLIC_KEY="cosign.pub"
# Download files (adjust URLs as needed)
curl -L -o "$ARTIFACT" "https://github.com/jdfalk/ghcommon/releases/download/v1.0.0/$ARTIFACT"
curl -L -o "$SIGNATURE" "https://github.com/jdfalk/ghcommon/releases/download/v1.0.0/$SIGNATURE"
curl -L -o "$PUBLIC_KEY" "https://github.com/jdfalk/ghcommon/releases/download/v1.0.0/$PUBLIC_KEY"
# Verify signature
if cosign verify-blob --key "$PUBLIC_KEY" --signature "$SIGNATURE" "$ARTIFACT"; then
echo "✅ Signature verified successfully"
# Proceed with deployment
else
echo "❌ Signature verification failed"
exit 1
fiFor more information about Cosign, visit the official documentation.