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

ci: add GitHub token permissions for workflow #86536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

varunsh-coder
Copy link

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

Other workflows already had permissions defined.

GitHub recommends defining minimum GITHUB_TOKEN permissions for securing GitHub Actions workflows

This project is part of the top 100 critical projects as per OpenSSF (https://github.com/ossf/wg-securing-critical-projects), so fixing the token permissions to improve security.

Before the change:
GITHUB_TOKEN has write permissions for multiple scopes, e.g.
https://github.com/cockroachdb/cockroach/runs/7616637964?check_suite_focus=true#step:1:19

After the change:
GITHUB_TOKEN will have minimum permissions needed for the jobs.

Signed-off-by: Varun Sharma varunsh@stepsecurity.io

@varunsh-coder varunsh-coder requested a review from a team as a code owner August 21, 2022 23:48
@blathers-crl
Copy link

blathers-crl bot commented Aug 21, 2022

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

Before a member of our team reviews your PR, I have some potential action items for you:

  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Aug 21, 2022

CLA assistant check
All committers have signed the CLA.

@blathers-crl blathers-crl bot added the O-community Originated from the community label Aug 21, 2022
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>
Release note: None
@blathers-crl
Copy link

blathers-crl bot commented Aug 21, 2022

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@varunsh-coder
Copy link
Author

After reviewing previous commits for GitHub Actions workflows, I have added Release note: None to commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants