ci(ci.yml): add permissions - #1227
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
📝 WalkthroughWalkthroughThis pull request adds an explicit top-level ChangesCI Permissions Hardening
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
commit: |
Add an explicit
permissionsblock at the workflow root (right afteron:) so all jobs inherit least-privilege defaults unless they override them.For this workflow, the minimal safe baseline recommended by CodeQL is:
contents: readThis preserves current functionality for common CI tasks like checkout/build/lint/test while ensuring token scope is explicitly constrained. If any omitted jobs later need write scopes, those should be added narrowly at the specific job level, not globally.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by CodeRabbit