-
Notifications
You must be signed in to change notification settings - Fork 22
chore(ci): restrict semgrep workflow permissions to only read contents #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
WalkthroughThe Semgrep GitHub Actions workflow was updated to include an explicit permissions block, granting the workflow read access to repository contents. No other steps or configurations within the workflow were altered. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Potential fix for https://github.com/openfga/js-sdk/security/code-scanning/1
To fix the problem, add a
permissionsblock to the workflow or job to explicitly restrict theGITHUB_TOKENpermissions. Since the Semgrep job only needs to check out code and run a scan, it only requires read access to repository contents. The best way to fix this is to addpermissions: contents: readat the job level (undersemgrep:), which will apply to this job only. This change should be made directly under thesemgrep:job definition, before thename:key.Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by CodeRabbit