ci: scope stale-repos App token to least privilege#40
Merged
Conversation
The create-github-app-token step set no permission-* inputs, so the installation token inherited blanket permissions (zizmor github-app). Scope it to what the workflow needs: contents:read + pull-requests:read (stale-repos activity/PR/release metrics) and issues:write (the report issue). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds least-privilege
permission-*inputs to theactions/create-github-app-tokenstep instale-repository-identifier.yaml. Without them, the installation token inherits all of the App's permissions (zizmorgithub-appfinding).Scopes the token to exactly what the workflow uses:
permission-contents: read+permission-pull-requests: read— stale-repos reads repo/PR/release activitypermission-issues: write— opens the stale-report issueContext
This hardening was written during #39 but landed on that branch after it was squash-merged, so it never reached
main(the alert was PR-surfaced only, not active onmain). This is the focused follow-up to land it.🤖 Generated with Claude Code