Verify a FosterStack Cache release yourself
You should not have to take our word for what you run. Five commands check the image signatures, the signed file lists, the image digest (a hash that identifies one exact image), how the release was built, and its parts list. They use only cosign, curl, jq and sha256sum, and need no account. Do the first one first: the others use the key it gives you.
VER=0.3.0 # the release you run, v0.3.0 or later
BASE=https://github.com/fosterstack/cache/releases/download/v${VER}
get() { for f in "$@"; do curl -fsSLO "$BASE/$f"; done; }
There are two images, production and -fips. The examples use production; for -fips, add -fips to the tag and use fips. in place of production..
1. The key and the image signatures
curl -fsSL -o release-key-root.pub "https://raw.githubusercontent.com/fosterstack/cache/v${VER}/.github/policy/release-key-root.pub"
get release-key-manifest.json release-key-manifest.sig
cosign verify-blob --key release-key-root.pub --signature release-key-manifest.sig --insecure-ignore-tlog release-key-manifest.json
jq -r .public_key release-key-manifest.json > release.rsa.pub
cosign verify --key release.rsa.pub ghcr.io/fosterstack/cache:${VER}
cosign verify --key release.rsa.pub ghcr.io/fosterstack/cache:${VER}-fips
What it proves: one root key, which we keep offline, signed the release key, and the release key signed these exact images. Each image signature is recorded in Rekor, the public transparency log. The root key's own signature is not, so the first check skips the log. Run the jq line only if the check before it prints Verified OK. Also compare valid_from and valid_to in the manifest with the current time, and stop if the time is outside them.
2. The file lists, and your files
get checksums.txt checksums.txt.bundle release-files.sha256 release-files.sha256.bundle release-manifest.json "fscache_${VER}_linux_amd64.tar.gz"
for f in checksums.txt release-files.sha256; do
cosign verify-blob --key release.rsa.pub --bundle "$f.bundle" "$f"
done
sha256sum -c <(grep "fscache_${VER}_linux_amd64.tar.gz" checksums.txt | grep -v sbom)
sha256sum -c <(grep release-manifest.json release-files.sha256)
What it proves: the two lists are ours, and the archive and the manifest you downloaded match them.
3. The digest
jq -r '.images[] | "\(.variant) \(.digest)"' release-manifest.json
What it proves: the digest of the image you pulled is one the signed manifest names. Every statement we sign names an image by digest, never by tag.
4. How it was built
This step and the next have not yet been run against a published v0.3.0 release. If a command fails, write to hello@fosterstack.com.
get provenance.bundle.json
cosign verify-blob-attestation --key release.rsa.pub --bundle provenance.bundle.json \
--type https://slsa.dev/provenance/v1 --check-claims=false
DIGEST=sha256:... # the digest of the production image you pulled, for example from docker images --digests
jq -e --arg d "${DIGEST#sha256:}" '.dsseEnvelope.payload | @base64d | fromjson | any(.subject[]; .name == "image-production" and .digest.sha256 == $d)' provenance.bundle.json
What it proves: the signed SLSA provenance, a record of how the images were built, names the image you pulled. The command prints true if it does. For the -fips image, use the name image-fips.
5. The parts list
get production.sbom.json production.sbom.json.bundle production.full.lock.json production.full.lock.json.bundle
for f in production.sbom.json production.full.lock.json; do
cosign verify-blob --key release.rsa.pub --bundle "$f.bundle" "$f"
done
What it proves: the SBOM (what is in the image) and the lock file (every package the image was assembled from, by checksum) are signed by our release key.
A valid signature proves who signed these exact files. It does not prove the software has no bugs; scan results and our statements about findings are separate: see the security policy.
Related: everything we do for security, the practices behind each release.
Moving off the free Build Cache Node? See what the end of life means and the migration guide.