Skip to content

Declare permissions on the release workflows#382

Open
arpitjain099 wants to merge 1 commit into
cloudflare:masterfrom
arpitjain099:ci/add-permissions
Open

Declare permissions on the release workflows#382
arpitjain099 wants to merge 1 commit into
cloudflare:masterfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

Adds explicit top-level permissions blocks to the two release workflows so the default GITHUB_TOKEN only carries the scopes those workflows actually use:

permissions:
  contents: write     # release.sh creates and pushes a release/* branch
  pull-requests: write   # repo-sync/pull-request opens the PR against master

The Google Chat notification step uses SSL_TEAM_GOOGLE_CHAT_WEBHOOK, not GITHUB_TOKEN, so it doesn't need any additional scopes. The sibling semgrep.yml is already hardened. YAML validated locally.

Both manual-release.yml and scheduled-release.yml run release.sh
(which can push a release branch) and use repo-sync/pull-request to
open a PR against master with GITHUB_TOKEN. Granting contents: write
+ pull-requests: write at the workflow level captures the actual
write scopes used; the rest of the steps (build, Google Chat
notification) need no extra GitHub API scopes.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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.

1 participant