Launcher and horizon-server update: install only releases whose signed checksums match

The launcher (game installs and its own updates) and `horizon-server update` fetch a release's
SHA256SUMS and SHA256SUMS.sig, check the signature against the keys built in from
crates/horizon-release-sign/release-keys.txt and the archive against the signed SHA-256, and
refuse anything unsigned, signed for another tag or by another key, or that doesn't match, with a
message saying why. Merge only once release-keys.txt lists the key and a signed stable release
exists: until then every download is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-19 14:25:47 +02:00
parent 4d2e05dda7
commit 36908858a3
12 changed files with 250 additions and 57 deletions
+4 -2
View File
@@ -410,8 +410,10 @@ runtime or new dependency. Server-sent events can replace the polling later if a
newer release a minute after it starts and then every 6 hours, and only says so, in its log, in `status`
and in the panel (`HORIZON_NO_UPDATE_CHECK=1` turns the check off). `update --check` asks GitHub once.
`update`:
1. downloads the release archive for this computer (on Linux the server build) and checks it against the
SHA-256 GitHub publishes for it;
1. downloads the newest stable release's archive for this computer (on Linux the server build; `--version`
picks another, a beta included) and checks it against the release's SHA256SUMS, whose Ed25519 signature
must check with a key built into `horizon-server` (docs/release-flow.md, "Signed checksums"): an unsigned
or tampered release is refused;
2. unpacks it into `<dir>/releases/<tag>`, beside the others, with its game files linked to
`<dir>/game-files` as the installers do;
3. stops the game, backs up the world (`backups/<time>-before-<tag>.zip`), records the release in use in