diff options
| author | mtg0001 <106211915+mtg0001@users.noreply.github.com> | 2026-08-04 10:18:01 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-04 10:18:01 -0300 |
| commit | f6c5b813075cae4228d241a3567e70b210504749 (patch) | |
| tree | 8d408438f3579a6a170be4d04cc68d33ab292782 /docs | |
| parent | 530f91910a4eceb6705d1212fa0e3ebe8418c6a3 (diff) | |
Add release verification tooling (#108)
Co-authored-by: Gilcimar Duarte <ti@gpm.infra>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/release-verification.md | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/release-verification.md b/docs/release-verification.md new file mode 100644 index 0000000..ecacd5f --- /dev/null +++ b/docs/release-verification.md | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | # Release Verification | ||
| 2 | |||
| 3 | Bitflash releases publish binaries and a `SHA256SUMS` file. The checksum file | ||
| 4 | proves that the file you downloaded matches the file the release page names. | ||
| 5 | A detached signature, `SHA256SUMS.asc`, proves that the checksum file itself was | ||
| 6 | signed by a trusted release key. | ||
| 7 | |||
| 8 | That gives users two separate checks: | ||
| 9 | |||
| 10 | 1. `gpg --verify SHA256SUMS.asc SHA256SUMS` checks who signed the checksums. | ||
| 11 | 2. `sha256sum -c SHA256SUMS` checks the binaries against those checksums. | ||
| 12 | |||
| 13 | ## User Check | ||
| 14 | |||
| 15 | From a shell with `curl` or `wget` and `sha256sum`: | ||
| 16 | |||
| 17 | ```bash | ||
| 18 | scripts/verify-release.sh latest | ||
| 19 | ``` | ||
| 20 | |||
| 21 | For a specific release: | ||
| 22 | |||
| 23 | ```bash | ||
| 24 | scripts/verify-release.sh v1.2.13 | ||
| 25 | ``` | ||
| 26 | |||
| 27 | For release audits, require the signature: | ||
| 28 | |||
| 29 | ```bash | ||
| 30 | scripts/verify-release.sh v1.2.13 --require-signature | ||
| 31 | ``` | ||
| 32 | |||
| 33 | Older releases may not have `SHA256SUMS.asc`. In that case the script warns and | ||
| 34 | still checks file integrity. New release audits should use `--require-signature`. | ||
| 35 | |||
| 36 | ## Maintainer Flow | ||
| 37 | |||
| 38 | After building release assets in the repository root: | ||
| 39 | |||
| 40 | ```bash | ||
| 41 | scripts/make-release-checksums.sh --sign --local-user RELEASE_KEY_ID | ||
| 42 | ``` | ||
| 43 | |||
| 44 | Upload all built assets plus: | ||
| 45 | |||
| 46 | ```text | ||
| 47 | SHA256SUMS | ||
| 48 | SHA256SUMS.asc | ||
| 49 | ``` | ||
| 50 | |||
| 51 | Keep the private signing key offline or on a dedicated release machine. Publish | ||
| 52 | the public key fingerprint in the release notes and keep using the same key for | ||
| 53 | future releases unless there is a clearly announced rotation. | ||
| 54 | |||
| 55 | ## Why This Matters | ||
| 56 | |||
| 57 | `SHA256SUMS` alone protects against a broken download, but not against someone | ||
| 58 | replacing both a binary and the checksum file. Signing `SHA256SUMS` means an | ||
| 59 | attacker must also have the release signing key to make the replacement verify. | ||
| 60 | |||
| 61 | This is not reproducible builds yet. It is the smaller, immediate step that | ||
| 62 | makes every release asset auditable by users before they run it. | ||