Repository navigation
Declare what each workflow may do with the token and stop persisting checkout credentials - #6784
Merged
Merged
Conversation
Seven workflows had no permissions block, so their jobs received the repository's default token scopes. The scopes now match what each job does: the GHCR image workflow keeps packages: write since it logs in with the job token, the elixir build and e2e jobs and the migrations check get pull-requests: read for dorny/paths-filter, the Terraform job gets pull-requests: write for the plan comment it posts, and everything else is read-only.
actions/checkout writes the job token into .git/config by default, so every later step, including third-party actions and the packages they install, can read it. Twelve of the fourteen checkouts never push: the docs deploy hands its token to the Pages action explicitly, and the rest only build, test or compare. Those twelve no longer keep the token. The two checkouts that commit with the bot token (the tracker release and the tracker version bump) keep it.
vinibrsl
force-pushed
the
ci-hardening
branch
from
November 2, 2026 20:18
cc6cbbd to
58b46c0
Compare
vinibrsl
approved these changes
Nov 2, 2026
Member
|
Thank you! |
Open
4 tasks done
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.
Changes
Hello, two commits on the workflows.
packages: writeon the GHCR image workflow,pull-requests: readwhere dorny/paths-filter runs, andpull-requests: writeon the Terraform job that posts its plan.Why: a job that only builds and tests should not hold a token that can write, and these workflows push the community-edition images, publish the tracker to npm and carry the Terraform Cloud token. The default token scopes are wider than any of them need.
Found and fixed by Plumber's analysis, reviewed and submitted by me. I'm also a long time customer of Plausible.
Tests
Changelog
Documentation
Dark mode