Misc GitHub Actions hardening - #270
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughDependabot schedules now include seven-day cooldowns. Reusable workflows persist checkout credentials and use environment variables for pull request branch values. Workflow contents permissions are restricted globally and restored only for jobs requiring write access. ChangesCI configuration updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/sync-workflows.yml (1)
13-22: 🔒 Security & Privacy | 🔵 TrivialVerify the scope of the token actually used by the sync action.
Workflow
permissionsscopes GitHub’s automatically issuedGITHUB_TOKEN, but both jobs passsecrets.ACTIONS_BOTunder that environment name at Lines 82 and 143. Therefore, the new permission restrictions do not constrain that cross-repository credential. Confirm it is least-privileged, ideally using a GitHub App token restricted to the required repositories and contents/workflow permissions. (docs.github.com)Also applies to: 88-89
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/sync-workflows.yml around lines 13 - 22, Update the credentials used by the sync-workflows jobs at the ACTIONS_BOT references so the cross-repository token is least-privileged and limited to only the required repositories with contents/workflow access, preferably via a GitHub App token. Ensure the token’s actual scopes are independently restricted rather than relying only on the workflow permissions block.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/reusable-check-branch-alias.yml:
- Line 34: Both reusable workflows disable persisted checkout credentials, so
authenticate Git before pushing: in
.github/workflows/reusable-check-branch-alias.yml at lines 34-34, add gh auth
setup-git before git push -f origin update-branch-alias; in
.github/workflows/reusable-regenerate-readme.yml at lines 26-27, add the same
authentication step before git push -f origin regenerate-readme.
---
Nitpick comments:
In @.github/workflows/sync-workflows.yml:
- Around line 13-22: Update the credentials used by the sync-workflows jobs at
the ACTIONS_BOT references so the cross-repository token is least-privileged and
limited to only the required repositories with contents/workflow access,
preferably via a GitHub App token. Ensure the token’s actual scopes are
independently restricted rather than relying only on the workflow permissions
block.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4d282610-f480-4bae-a52e-ea20e3406d8b
📒 Files selected for processing (4)
.github/dependabot.yml.github/workflows/reusable-check-branch-alias.yml.github/workflows/reusable-regenerate-readme.yml.github/workflows/sync-workflows.yml
Summary by CodeRabbit