Skip to content

ci(security): restrict GITHUB_TOKEN permissions in update-plugins workflow#7557

Merged
JohnMcLear merged 1 commit intoether:developfrom
JohnMcLear:chore/workflow-permissions
Apr 19, 2026
Merged

ci(security): restrict GITHUB_TOKEN permissions in update-plugins workflow#7557
JohnMcLear merged 1 commit intoether:developfrom
JohnMcLear:chore/workflow-permissions

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

Addresses CodeQL code-scanning alert #115"Workflow does not contain permissions".

update-plugins.yml was the only workflow without an explicit permissions: block; all the others already scope the default GITHUB_TOKEN down. The 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 contents: read for actions/checkout.

Test plan

  • Lint diff is 6 added lines of YAML; no other files change
  • Next scheduled run still succeeds (actions/checkout, pnpm install, and the PAT-authenticated git/gh calls all work under contents: read)

🤖 Generated with Claude Code

…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>
@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Restrict GITHUB_TOKEN permissions in update-plugins workflow

✨ Enhancement

Grey Divider

Walkthroughs

Description
• 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
Diagram
flowchart 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"]
Loading

Grey Divider

File Changes

1. .github/workflows/update-plugins.yml Security +6/-0

Add explicit GITHUB_TOKEN permissions block

• Adds explicit permissions: block with contents: read scope
• Includes explanatory comment about PLUGINS_PAT authentication
• Restricts default GITHUB_TOKEN to minimum required permissions
• Resolves CodeQL security scanning alert #115

.github/workflows/update-plugins.yml


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects Bot commented Apr 19, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@JohnMcLear JohnMcLear merged commit 3ccf0b1 into ether:develop Apr 19, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant