Skip to content
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

CI workflows security hardening #12952

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Conversation

sashashura
Copy link
Contributor

@sashashura sashashura commented Sep 25, 2022

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.

New or Enhanced Feature

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
@sashashura sashashura changed the title GitHub Workflows security hardening ci: orkflows security hardening Sep 25, 2022
@sashashura sashashura changed the title ci: orkflows security hardening ci: workflows security hardening Sep 25, 2022
@john-westcott-iv
Copy link
Member

Thanks for your contribution. We've added this to our backlog to get tested and merged. While you are waiting on the testing process please feel free to reach out to us in the #ansible-awx matrix channel.

@sashashura
Copy link
Contributor Author

How is it going? Do you have any questions for me?

@john-westcott-iv john-westcott-iv added the community pull request Applied to community based pull requests for filtering label Jan 20, 2023
@TheRealHaoLiu TheRealHaoLiu self-assigned this Apr 11, 2023
@john-westcott-iv john-westcott-iv merged commit 3975028 into ansible:devel Apr 11, 2023
1 check passed
@john-westcott-iv john-westcott-iv changed the title ci: workflows security hardening CI workflows security hardening Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community pull request Applied to community based pull requests for filtering community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants