ci(security): restrict GITHUB_TOKEN permissions in update-plugins workflow#7557
Merged
JohnMcLear merged 1 commit intoether:developfrom Apr 19, 2026
Merged
Conversation
…kflow Adds an explicit `permissions: contents: read` block to update-plugins.yml. Cross-repo work (cloning ether/ep_* repos, pushing updates, merging Dependabot PRs) is authenticated via secrets.PLUGINS_PAT, so the default GITHUB_TOKEN only needs read access for actions/checkout. Addresses CodeQL code-scanning alert ether#115 ("Workflow does not contain permissions"). Matches the pattern already used by the other workflows under .github/workflows/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review Summary by QodoRestrict GITHUB_TOKEN permissions in update-plugins workflow
WalkthroughsDescription• Adds explicit permissions block to update-plugins workflow • Restricts GITHUB_TOKEN to read-only access for contents • Addresses CodeQL code-scanning alert #115 • Aligns with security best practices across workflows Diagramflowchart LR
A["update-plugins.yml<br/>workflow"] -->|"add permissions block"| B["GITHUB_TOKEN<br/>contents: read"]
C["secrets.PLUGINS_PAT"] -->|"authenticates"| D["cross-repo operations<br/>clone, push, merge"]
B -->|"enables"| E["actions/checkout"]
File Changes1. .github/workflows/update-plugins.yml
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
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.
Summary
Addresses CodeQL code-scanning alert #115 — "Workflow does not contain permissions".
update-plugins.ymlwas the only workflow without an explicitpermissions:block; all the others already scope the defaultGITHUB_TOKENdown. The cross-repo work (cloningether/ep_*repos, pushing updates, merging Dependabot PRs) is authenticated viasecrets.PLUGINS_PAT, so the defaultGITHUB_TOKENonly needscontents: readforactions/checkout.Test plan
actions/checkout,pnpm install, and the PAT-authenticated git/gh calls all work undercontents: read)🤖 Generated with Claude Code