Skip to content

GitHub Workflows security hardening - #3117

Merged
AyanSinhaMahapatra merged 3 commits into
aboutcode-org:prep-release-31-2from
sashashura:patch-1
Oct 4, 2022
Merged

AyanSinhaMahapatra merged 3 commits into
aboutcode-org:prep-release-31-2from
sashashura:patch-1

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>
@pombredanne

Copy link
Copy Markdown
Member

@sashashura Thanks... this looks rather useful!

Comment thread .github/workflows/scancode-release.yml
@pombredanne pombredanne added this to the v31.2 milestone Oct 3, 2022
@AyanSinhaMahapatra
AyanSinhaMahapatra changed the base branch from develop to prep-release-31-2 October 4, 2022 18:50
@AyanSinhaMahapatra
AyanSinhaMahapatra merged commit 16eb12d into aboutcode-org:prep-release-31-2 Oct 4, 2022
@AyanSinhaMahapatra

Copy link
Copy Markdown
Member

LGTM! Thanks @sashashura

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.

3 participants