Repository navigation
Declare explicit GITHUB_TOKEN permissions in workflows - #135
Merged
Merged
Conversation
Restrict the token to read-only repository contents. The docs workflow additionally needs pull-requests: write to comment the preview URL. Fixes #117 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
i think another pr changed the preview behavior |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Right, #137 changed it: the PR-comment steps now only run on a manual dispatch from a non-main branch (on main that's a production rebuild, so no comment is posted). They still exist, so |
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.
Fixes #117.
No workflow declared
permissions:, and the repository default forGITHUB_TOKENis currently read/write. This PR adds workflow-level blocks:test.ymlandbuild-all-and-publish.yml:contents: read.docs.yml:contents: readandpull-requests: write. The write scope is used bygh-get-current-prandactions-comment-pull-requestto post the preview link.Every job and action was checked. Checkout, setup-java/setup-uv, the artifact and cache actions (these use the runtime token), wrangler (Cloudflare secrets) and the Maven Central deploy (its own secrets) need nothing beyond this.
Manual follow-ups (repo settings):
🤖 Generated with Claude Code