Skip to content

release: mint the tap and bucket token from a GitHub App (spore-host#746) - #1645

Merged
scttfrdmn merged 1 commit into
mainfrom
ci/release-app-token
Nov 15, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
ci/release-app-token

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Part of spore-host/spore-host#746.

  • release.yaml: a new step "Mint the tap and bucket token" (actions/create-github-app-token v3.3.0, SHA-pinned) mints a one-hour token from the spore-host-release App: owner: spore-host, repositories: homebrew-tap,scoop-bucket, permission-contents: write. GoReleaser gets it in place of the two classic PATs.

  • infra/github-tokens/tokens.json: the two PAT entries become one github-app entry for RELEASE_APP_PRIVATE_KEY, whose installation is exactly the tap and the bucket.

  • github_tokens_test.go:

    • an App key may list more than one repository, since its installation is the boundary;
    • a new test, TestAppTokensAreMintedNoWiderThanTheInventory, fails any minting step with no owner:, with a repositories: list other than the entry's (unset, it would mint for spawn), or without explicit permission-* inputs within the entry.

    Mutation-checked against four changes, each caught: adding spawn to repositories:, and dropping repositories:, owner: or permission-contents:.

  • Docs: infra/github-tokens/README.md and docs/release-tap-token.md describe the App, how to rotate its key, and why it must never be installed on spawn.

The installer-pins workflow is unchanged: it stays on GITHUB_TOKEN and its issue fallback, because the App must not reach spawn.

Verified by the next release: the mint step must be green, and so must GoReleaser's brew and scoop phases.

@scttfrdmn scttfrdmn added this to the Hardening milestone Nov 15, 2026
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 63da33a into main Nov 15, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the ci/release-app-token branch November 15, 2026 06:57
@scttfrdmn scttfrdmn mentioned this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant