-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(security): Read-all and Write-all permissions should not be used in .github/workflows/sonarcloud.yaml. #5399
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
…in .github/workflows/sonarcloud.yaml Signed-off-by: JiGuoDing <485204300@qq.com>
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
|
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 enhances security by replacing the overly permissive read-all permission with specific contents: read permission at the workflow level in the sonarcloud.yaml GitHub Actions workflow file. This follows the principle of least privilege while maintaining functionality, as the job-level permissions already explicitly define all required access rights.
Key Changes:
- Replaced
permissions: read-allwith explicitpermissions: contents: readat the workflow level
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5399 +/- ##
=======================================
Coverage 57.52% 57.52%
=======================================
Files 444 444
Lines 30744 30744
=======================================
Hits 17687 17687
Misses 11443 11443
Partials 1614 1614 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
RongGu
left a comment
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.
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RongGu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



Ⅰ. Describe what this PR does
This PR tries to replace "read-all" with specific permissions for security reasons.
Ⅱ. Does this pull request fix one issue?
fixes #5398
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews