Repository navigation
Harden the publishing jobs: tag-only environment, no stored tokens, no third-party release action - #72
Merged
Conversation
- apt and dnf deploy to the `release` environment, which only `v*` tags can deploy to, so its secret is out of reach of a workflow on a branch - every checkout sets persist-credentials: false - the gh-pages pushes take the token from the environment through a credential helper, not in the URL on git's command line - the release is created with gh rather than a third-party action, so no code from outside GitHub runs in the job that writes it - RELEASING.md: the environment, the tag ruleset and the allowed actions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FNs394W7GMp53qrHNPrACN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Items 2–4 of the workflow security check (item 1 is #71).
In this PR
aptanddnfdeploy to the newreleaseenvironment (onlyv*tags may deploy), so the signing key can live there instead of as a repository secret.persist-credentials: falseon all 15 checkouts.gh-pagespushes take the token fromGH_TOKENthrough a credential helper instead of embedding it in the URL.softprops/action-gh-releasereplaced withgh release create(oredit+upload --clobberon a re-run), so the job holdingcontents: writeover the release runs no third-party code.Already applied to the repository with gh api
release, deployment policy: tagsv*.v*tags restricted to admins (you bypass).dtolnay/rust-toolchain,Swatinem/rust-cache,taiki-e/install-action, andsoftprops/action-gh-release(to remove once this merges); SHA pinning required.Still to do: the key isn't on this machine, so
APT_GPG_PRIVATE_KEYis still a repository secret. It works with this PR as is (repository secrets reach environment jobs too); moving it is one command from the machine holding the key backup.The publishing jobs only run on a tag, so CI here exercises the checkout change, not the release path.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FNs394W7GMp53qrHNPrACN