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

GitHub Workflows security hardening #2811

Merged
merged 1 commit into from
Sep 1, 2022
Merged

GitHub Workflows security hardening #2811

merged 1 commit into from
Sep 1, 2022

Conversation

joschi
Copy link
Member

@joschi joschi commented Aug 31, 2022

This commit 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.

Refs #2810

This commit 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.

Refs #2810
@joschi joschi added security Pull requests that address a security vulnerability github_actions Pull requests that update Github_actions code labels Aug 31, 2022
@joschi joschi added this to the 4.1.34 milestone Aug 31, 2022
@joschi joschi self-assigned this Aug 31, 2022
@joschi joschi requested review from a team as code owners August 31, 2022 21:20
@gitpod-io
Copy link

gitpod-io bot commented Aug 31, 2022

@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@joschi joschi merged commit 3c1f428 into release/4.1.x Sep 1, 2022
@joschi joschi deleted the pr-2810-4.1.x branch September 1, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants