Verifying releases
Every release from v0.4.3 onward attaches, alongside the binaries themselves:
checksums.txt- a SHA-256 digest of every archivechecksums.txt.sigstore.json- a cosign signature overchecksums.txt, using GitHub Actions’ own identity (no key for anyone to leak or rotate)multiple.intoto.jsonl- SLSA Build L3 provenance, attesting these exact artifacts were built by this exact GitHub Actions workflow run, from this exact source commit- one
<archive>.sbom.jsonper archive - a software bill of materials (SPDX JSON, via Syft), listing every dependency actually built into that binary
None of this replaces the others - each checks something different, and every command below was run against a real downloaded release before being written down here.
Checksum
The baseline check: confirms each downloaded archive matches the
SHA-256 digest recorded in checksums.txt - an integrity check
only, catching corruption or a swapped-in wrong file. It does not
authenticate checksums.txt itself: an attacker able to replace
the archive could just as easily replace the checksums file to match.
That’s what the signature below is for.
# Linux (GNU coreutils)
sha256sum --check checksums.txt
# macOS
shasum -a 256 -c checksums.txt
Signature
Confirms checksums.txt - and so, transitively, every archive it lists -
was signed by this project’s own release workflow, not tampered with
after the fact. Needs cosign
installed.
cosign verify-blob \
--certificate-identity "https://github.com/brunoarueira/xlq/.github/workflows/release.yml@refs/heads/main" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
--bundle checksums.txt.sigstore.json \
checksums.txt
--certificate-identity is the exact workflow path and ref that signed
it - this project’s own release.yml, triggered on main (not a tag
push; see ADR-0006
for why). A signature from anything else is rejected, not silently
accepted.
Provenance
Confirms a specific binary came from this exact workflow run and source
commit - not just a signed release, but this one, independently of
the signature above. Needs
slsa-verifier
installed.
slsa-verifier verify-artifact \
--provenance-path multiple.intoto.jsonl \
--source-uri github.com/brunoarueira/xlq \
--source-branch main \
xlq_0.4.3_darwin_arm64.tar.gz
Substitute the archive name for whichever platform you downloaded -
xlq_<version>_darwin_amd64.tar.gz, ..._linux_arm64.tar.gz, and so
on, except Windows, which is a .zip: xlq_<version>_windows_amd64.zip.
--source-branch main, not --source-tag <version> - confirmed
directly: --source-tag fails here (“invalid ref: unexpected ref
type”), since this pipeline’s provenance records the build as coming
from a push to main, not a tag-triggered run (the same reason
behind --certificate-identity’s refs/heads/main above). A
tampered or substituted archive fails clearly instead of passing:
$ slsa-verifier verify-artifact --provenance-path multiple.intoto.jsonl \
--source-uri github.com/brunoarueira/xlq --source-branch main \
tampered.tar.gz
FAILED: SLSA verification failed: expected hash '...' not found:
artifact hash does not match provenance subject
Software bill of materials
Not a trust check by itself - lists what’s actually inside a given archive, for a vulnerability scanner or a security review to act on:
jq '.packages[] | .name' xlq_0.4.3_darwin_arm64.tar.gz.sbom.json
Same naming pattern as the archives above - one .sbom.json per
archive, .tar.gz.sbom.json or, for Windows, .zip.sbom.json.