fix: Workflow does not contain permissions#141
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. WalkthroughUpdated the GitHub Actions release-drafter workflow: added a top-level permissions block with contents: read, restricted push trigger to the main branch, and enabled manual triggering via workflow_dispatch. No other logic changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (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/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Commit-Check ✔️ |
This reverts commit 4d2f384.
Potential fix for https://github.com/commit-check/commit-check-action/security/code-scanning/1
To fix the problem, add an explicit
permissions:block to the workflow. You should add it at the top level (root) of the workflow (just after thename:oron:block), or if you prefer to give each job specific permissions, to the relevant job(s). The ideal permissions depend on what the workflow does. As a minimal safe starting point, setcontents: read. This ensures the GITHUB_TOKEN used by this workflow job has only read-only access to the repository contents, and no unnecessary write privileges.In
.github/workflows/release-drafter.yml, add:between the
name:andon:blocks (as per the common convention and GitHub Actions YAML structure).Suggested fixes powered by Copilot Autofix. Review carefully before merging.
Summary by CodeRabbit