Repository navigation
Add read-only permissions and self-repo actions in local_env_tests.yml - #41631
Conversation
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR hardens .github/workflows/local_env_tests.yml by adding top-level permissions: contents: read and updating local composite action references to use the $/... self-repository syntax. The changes are minimal, consistent with other workflow hardening updates in the repository, and do not impact workflow functionality.
🔍 General Feedback
- Both
run_local_env_install_ubuntuandrun_local_env_install_maconly check out the repository, set up toolchains/caches, and run local setup verification scripts, socontents: readis sufficient under the principle of least privilege.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @damccorm for label build. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
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:
CodeQL/zizmor) onmasterwithout altering intended public API or workflow semanticsIf 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 all 7 open Code Scanning findings (
CodeQLactions/missing-workflow-permissions,zizmor/excessive-permissions, andzizmor/self-repository— alerts#25,#28,#1577–#1579,#3136,#3511) in.github/workflows/local_env_tests.yml:permissions: contents: readso neitherrun_local_env_install_ubuntunorrun_local_env_install_macinherits default repository write scopes.setup-environment-actionreferences from./.github/...to GitHub's$/...self-repository syntax.Verification
workflow_dispatchrun oflocal_env_tests.ymlon branchcodescan/gha-local-env-tests-permissions: https://github.com/apache/beam/actions/runs/45438816723 (successacross bothUbuntu run local environment shell scriptandMac run local environment shell script)./gradlew :beam-test-gha:preCommit,zizmor, andCodeQL