-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Set permissions for workflows to follow a good security practice. #300
Conversation
Visit the preview URL for this PR (updated for commit fd425c8): https://sharezone-test--pr300-set-github-action-de-19rcpvpg.web.app (expires Wed, 05 Oct 2022 22:30:57 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
.github/workflows/main.yml
Outdated
@@ -154,6 +160,9 @@ jobs: | |||
# 4. Adjust website restrictions for Firebase Key "Sharezone Web Key". | |||
web-preview: | |||
runs-on: ubuntu-latest | |||
permissions: | |||
pull-requests: write # for FirebaseExtended/action-hosting-deploy to comment on PRs | |||
checks: write # for FirebaseExtended/action-hosting-deploy |
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.
Couldn't find what the checks
permissions is exactly for. Can you add it to the comment next to it?
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 thing is that I also don't know why it's needed but without it's not posting the comment. It also needs to be write
. read
is not working.
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.
Added the comment
for FirebaseExtended/action-hosting-deploy to comment on PRs (without write permissions for checks the action doesn't post a comment to the PR)
Co-authored-by: Jonas Sander <[email protected]>
Co-authored-by: Jonas Sander <[email protected]>
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
Co-authored-by: Jonas Sander <[email protected]>
Having workflows without setting the permission for the workflow is considered a bad security practice and it is causing alerts from our scanning tools.