Skip to content

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.

Signed-off-by: sashashura [email protected]
(cherry picked from commit 5bf0b02)

This PR adds explicit [permissions
section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)
to workflows. This is a security best practice because by default
workflows run with [extended set of
permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
(except from `on: pull_request` [from external
forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)). 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](https://securitylab.github.com/research/github-actions-untrusted-input/)
or compromised third party tool or action) is restricted.

It is recommended to have [most strict permissions on the top
level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions)
and grant write permissions on [job
level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
case by case.

Signed-off-by: sashashura <[email protected]>
(cherry picked from commit 5bf0b02)
@ompiteam-bot
Copy link

Can one of the admins verify this patch?

@jsquyres jsquyres added this to the v4.1.5 milestone Sep 2, 2022
@jsquyres jsquyres merged commit 0d8b737 into open-mpi:v4.1.x Sep 2, 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.

3 participants