-
Notifications
You must be signed in to change notification settings - Fork 495
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
Fix code scanning alerts #27074
base: main
Are you sure you want to change the base?
Fix code scanning alerts #27074
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #27074 +/- ##
=======================================
Coverage 63.97% 63.97%
=======================================
Files 1707 1707
Lines 163021 163021
Branches 4384 4384
=======================================
+ Hits 104293 104294 +1
+ Misses 50598 50597 -1
Partials 8130 8130
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -11,6 +11,9 @@ defaults: | |||
# fail-fast using bash -eo pipefail. See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference | |||
shell: bash | |||
|
|||
permissions: | |||
contents: read |
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.
Can you describe this change?
Who is getting read permission?
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.
This Github action does not modify the repository, so it does not need "write" permissions. Thus we should set that it only needs "read" permissions on the repository (principle of least authority), to prevent abuse in the future.
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
These are fixes to some of the alerts in: https://github.com/fleetdm/fleet/security/code-scanning