ci: the agent's version and publish run only on the server's runner, the release key sealed with a key only it has #137

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:ci/sealed-release-key into main 2026-11-21 21:25:01 +00:00
Owner

Summary

A runner gets every secret the repository and the organization have for each job it takes (forks' pull requests excepted), not only the secrets that job reads. So a runner lent by someone else, which takes ubuntu-latest jobs, got Beanstalk's RELEASE_SIGNING_KEY with every push it built. The same goes for Longshot and the launcher: Longshot #2123, LongshotLauncher #241.

  • version and Sign and publish now ask for label deploy, which only the server's quick runner carries.
  • Both signing steps read RELEASE_SIGNING_KEY_SEALED and open it with the server's seal.key, which only that runner lets a job mount. That's SHA256SUMS, signed and the permanent links. The sealing is the same as Longshot's scripts/ci_secret.sh. It's a repository secret, so it takes the place of the organization's (Longshot's) key of the same name. A runner without seal.key signs nothing.
  • docs/deploy.md and .forgejo/actionlint.yaml updated (actionlint gets label deploy).

RELEASE_SIGNING_KEY_SEALED is already set: Beanstalk's key, sealed on the server's runner by a one-off job (deleted since). The plain RELEASE_SIGNING_KEY is still in the repository's secrets. Delete it once this merges.

Testing

Tested: the same deploy label, container and volume, and the same openssl settings, ran on unraid-quick-1 today, and the key sealed and opened again byte for byte. Nothing else ran; the change was checked by reading it.

Still to test:

  • Server: the next agent nightly's Sign and publish runs on unraid-quick-1 and passes both verify steps (by hand, in the run's log).

Risks

If the secret or the server's runner were missing, a release would stop at SHA256SUMS, signed. Nothing would be published wrongly. Reverting is enough.

🤖 Generated with Claude Code

## Summary A runner gets every secret the repository and the organization have for each job it takes (forks' pull requests excepted), not only the secrets that job reads. So a runner lent by someone else, which takes `ubuntu-latest` jobs, got Beanstalk's `RELEASE_SIGNING_KEY` with every push it built. The same goes for Longshot and the launcher: [Longshot #2123](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2123), [LongshotLauncher #241](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/241). - `version` and *Sign and publish* now ask for label **`deploy`**, which only the server's quick runner carries. - Both signing steps read **`RELEASE_SIGNING_KEY_SEALED`** and open it with the server's `seal.key`, which only that runner lets a job mount. That's *SHA256SUMS, signed* and the permanent links. The sealing is the same as Longshot's `scripts/ci_secret.sh`. It's a repository secret, so it takes the place of the organization's (Longshot's) key of the same name. A runner without `seal.key` signs nothing. - `docs/deploy.md` and `.forgejo/actionlint.yaml` updated (actionlint gets label `deploy`). `RELEASE_SIGNING_KEY_SEALED` is already set: Beanstalk's key, sealed on the server's runner by a one-off job (deleted since). The plain `RELEASE_SIGNING_KEY` is still in the repository's secrets. Delete it once this merges. ## Testing **Tested:** the same `deploy` label, container and volume, and the same `openssl` settings, ran on `unraid-quick-1` today, and the key sealed and opened again byte for byte. Nothing else ran; the change was checked by reading it. **Still to test:** - Server: the next agent nightly's *Sign and publish* runs on `unraid-quick-1` and passes both `verify` steps (by hand, in the run's log). ## Risks If the secret or the server's runner were missing, a release would stop at *SHA256SUMS, signed*. Nothing would be published wrongly. Reverting is enough. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: the agent's version and publish run only on the server's runner, the release key sealed with a key only it has
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
CI / Coordinator tests (pull_request) Failing after 1m26s
CI / Agent build and checks (pull_request) Successful in 1m26s
CI / Coordinator image (pull_request) Successful in 12s
d76292cbb9
A runner gets every secret of the jobs it takes, so a runner lent by someone else got Beanstalk's
RELEASE_SIGNING_KEY with each push it built. Now the key is RELEASE_SIGNING_KEY_SEALED, opened only
with the server's seal.key, and version and publish run on label deploy, the one runner with it
(Longshot's docs/dev/reference/ci.md, Secrets only our runners can open).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: ci: the agent's version and publish run only on the server's runner, the release key sealed with a key only it has to ci: the agent's version and publish run only on the server's runner, the release key sealed with a key only it has 2026-11-21 21:24:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!137
No description provided.