-
-
Notifications
You must be signed in to change notification settings - Fork 14
Update workflow permissions #996
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
Set workflow permissions to none and add job-level permissions instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates GitHub Actions workflow permissions by removing global workflow-level permissions and implementing job-level permissions instead. This follows security best practices by applying the principle of least privilege at a more granular level.
- Removes global
contents: readpermissions from workflow level - Adds empty permissions object
{}at workflow level to explicitly deny all default permissions - Moves
contents: readpermission to individual job level in dependency-review workflow
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/dependency-review.yml | Moves contents permission from workflow to job level |
| .github/workflows/build.yml | Removes global contents permission, sets empty permissions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| permissions: | ||
| contents: read | ||
| permissions: {} |
Copilot
AI
Aug 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build job may require permissions to function properly. Consider adding job-level permissions for the build job similar to how it was done in dependency-review.yml, or verify that the build job doesn't need any permissions.
| permissions: {} |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #996 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 16 16
Lines 284 284
Branches 37 37
=======================================
Hits 280 280
Misses 2 2
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Set workflow permissions to none and add job-level permissions instead.