Skip to content

GitHub Workflows security hardening #17246

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

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

sashashura
Copy link
Contributor

This PR adds explicit permissions section to workflows. This is a security best practice because by default workflows run with extended set of permissions (except from on: pull_request from external forks). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an injection or compromised third party tool or action) is restricted.
It is recommended to have most strict permissions on the top level and grant write permissions on job level case by case.

@carsonbot carsonbot added this to the 6.2 milestone Sep 2, 2022
@OskarStark
Copy link
Contributor

Should be merged against 4.4

@sashashura
Copy link
Contributor Author

Do you mean also or instead?

@OskarStark
Copy link
Contributor

Instead please, we will then upmerge your change to newer branches

@wouterj
Copy link
Member

wouterj commented Sep 4, 2022

Please note that we can switch branches during the merge, so there is nothing for you to do (if you don't know how to do it or don't have the time to do it).

@sashashura
Copy link
Contributor Author

Please note that we can switch branches during the merge, so there is nothing for you to do (if you don't know how to do it or don't have the time to do it).

Please do. I just made a pull request against the default branch.

@OskarStark OskarStark modified the milestones: 6.2, 4.4 Sep 7, 2022
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
@OskarStark OskarStark changed the base branch from 6.2 to 4.4 September 7, 2022 20:35
@OskarStark OskarStark requested a review from xabbuh as a code owner September 7, 2022 20:35
@OskarStark
Copy link
Contributor

Thank you @sashashura.

@OskarStark OskarStark merged commit 36b6da6 into symfony:4.4 Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants