Skip to content

ci: add minimum GitHub token permissions for workflows#11285

Merged
roidelapluie merged 2 commits intoprometheus:mainfrom
ashishkurmi:main
Jul 18, 2023
Merged

ci: add minimum GitHub token permissions for workflows#11285
roidelapluie merged 2 commits intoprometheus:mainfrom
ashishkurmi:main

Conversation

@ashishkurmi
Copy link
Copy Markdown
Contributor

Description

This PR adds minimum token permissions for the GITHUB_TOKEN in GitHub Actions workflows using https://github.com/step-security/secure-workflows.

GitHub Actions workflows have a GITHUB_TOKEN with write access to multiple scopes.
Here is an example of the permissions in one of the workflows:
https://github.com/prometheus/prometheus/runs/8238094120?check_suite_focus=true#step:1:19

The 'Lock Threads' workflow already has the minimum token permission set. After this change, the scopes will be reduced to the minimum needed for other workflows.

Motivation and Context

Signed-off-by: Ashish Kurmi [email protected]

Co-authored-by: Christian Hoffmann <[email protected]>
Signed-off-by: Ashish Kurmi <[email protected]>
@ashishkurmi
Copy link
Copy Markdown
Contributor Author

Thanks for flagging the gap @hoffie! I have incorporated your requested change, please take a look again.

@hoffie
Copy link
Copy Markdown
Contributor

hoffie commented Sep 20, 2022

Thanks for flagging the gap @hoffie! I have incorporated your requested change, please take a look again.

Looks good to me, but I don't feel confident commenting on the other actions. ;)

@roidelapluie
Copy link
Copy Markdown
Member

Thanks!

@roidelapluie roidelapluie merged commit e0502f0 into prometheus:main Jul 18, 2023
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