Skip to content

ci: GitHub Workflows security hardening#2064

Merged
BlackHole1 merged 5 commits into
electron:masterfrom
sashashura:patch-3
Dec 1, 2022
Merged

ci: GitHub Workflows security hardening#2064
BlackHole1 merged 5 commits into
electron:masterfrom
sashashura:patch-3

Conversation

@sashashura

Copy link
Copy Markdown
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.

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
Signed-off-by: Alex <aleksandrosansan@gmail.com>
@sashashura sashashura requested a review from Toinane as a code owner September 25, 2022 16:42
@sashashura sashashura changed the title GitHub Workflows security hardening ci: GitHub Workflows security hardening Sep 25, 2022
Comment thread .github/workflows/schedule.yml Outdated
Comment thread .github/workflows/test.yml Outdated
sashashura and others added 2 commits September 26, 2022 08:36
Co-authored-by: Black-Hole <158blackhole@gmail.com>

@BlackHole1 BlackHole1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BlackHole1 BlackHole1 requested a review from a team September 26, 2022 07:59
@sashashura

Copy link
Copy Markdown
Contributor Author

@Toinane? @erickzhao?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants