-
-
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
Fix "label-pr" workflow for PR from forks #297
Conversation
Visit the preview URL for this PR (updated for commit 6195340): https://sharezone-test--pr297-fix-label-pr-for-for-8665qa3m.web.app (expires Wed, 05 Oct 2022 08:00:37 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
# | ||
# Having workflows without default permissions is considered a bad security | ||
# practice and it is causing alerts from our scanning tools. | ||
permissions: read-all |
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.
Wouldn't it be better to only grant the permissions that the action actually needs?
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.
Because the repository is public, I don't think you can not read with the GITHUB_TOKEN
things that are not already public. But I changed it to permissions: {}
which disables all permission and it still works 👍
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, See comment above though
# Having workflows without default permissions is considered a bad security | ||
# practice and it is causing alerts from our scanning tools. |
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.
# Having workflows without default permissions is considered a bad security | |
# practice and it is causing alerts from our scanning tools. | |
# Having workflows with default permissions is considered a bad security | |
# practice and it is causing alerts from our scanning tools. |
Shouldn't it be this?
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.
It means the default permission in workflow. In this case
permissions: {}
Tested it manually (by using
pull_request
): https://github.com/SharezoneApp/sharezone-app/actions/runs/3136587111/jobs/5093688752The workflow is not running for this PR because it's not on our
main
branch. It will be used when this PR has been merged.Closes #294