chore(ci): apply least privilege permission to GitHub Actions#7350
chore(ci): apply least privilege permission to GitHub Actions#7350yasnagat wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📜 Recent review details🧰 Additional context used🪛 zizmor (1.25.2).github/workflows/build-pr.yml[warning] 60-60: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow (secrets-inherit) [warning] 84-84: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow (secrets-inherit) 🔇 Additional comments (20)
WalkthroughThis PR hardens GitHub Actions security across eleven workflow files by explicitly declaring minimal token permissions. All workflows now restrict default GitHub token access via ChangesCI/CD Workflow Permissions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposed changes
This PR applies the principle of least privilege to
GITHUB_TOKENpermissions across all GitHub Actions workflows by settingpermissions: {}globally and explicitly re-granting only the minimum permissions required per job, as part of a supply chain security hardening effort.Workflows relied on GitHub’s default token scopes, which may grant more access than most jobs actually need. Scoping permissions at the job level reduces the attack surface in the event that a GitHub Action, third-party dependency, or CI component is compromised, helping mitigate the impact of potential supply chain attacks and limiting unnecessary repository access.
Issue(s)
SB-975
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit