Skip to content

Scope write permissions to jobs in cut_release_branch.yml - #41522

Merged
Amar3tto merged 1 commit into
masterfrom
codescan/gha-cut-release-permissions
Nov 23, 2026
Merged

Amar3tto merged 1 commit into
masterfrom
codescan/gha-cut-release-permissions

Conversation

@derrickaw

Copy link
Copy Markdown
Collaborator

Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:

  • The PR remediates confirmed, live Code Scanning finding(s) (CodeQL / zizmor) on master without altering intended public API or workflow semantics
  • The fix is minimal, idiomatic, and avoids suppressing alerts or masking underlying defects
  • Relevant unit tests, linters, and CI checks have been verified

If you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)

Summary

  • Resolves 2 zizmor/excessive-permissions (High / error, alerts #1512, #1513) findings in .github/workflows/cut_release_branch.yml.
  • Restricts top-level workflow permissions to contents: read (removing unused pull-requests: write and avoiding unnecessary write permissions on start_snapshot_build) and scopes contents: write specifically to the update_release_branch and update_master jobs.

Verification

  • ./gradlew :beam-test-gha:preCommit
  • Validated YAML syntax via PyYAML

@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR properly restricts top-level GitHub Actions permissions to contents: read in .github/workflows/cut_release_branch.yml and scopes contents: write specifically to the update_release_branch and update_master jobs. It also removes the unused pull-requests: write permission.

🔍 General Feedback

  • The changes accurately adhere to the principle of least privilege without altering workflow functionality (start_snapshot_build only requires default read permissions while update_release_branch and update_master push branches/tags).

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions github-actions Bot added build size/xs XS: <10 lines changed labels Nov 20, 2026
@derrickaw derrickaw added ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review and removed ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review labels Nov 20, 2026
@derrickaw
derrickaw marked this pull request as ready for review November 21, 2026 02:38
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Amar3tto for label build.
Backup reviewer: Abacn (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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.

2 participants