Repository navigation
Conversation
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR cleanly resolves the remaining 10 High-severity zizmor Code Scanning alerts by scoping dangerous-triggers ignores in .github/zizmor.yml to five audited bot/housekeeping workflows and adding an inline template-injection ignore to gradle-command-self-hosted-action/action.yml.
🔍 General Feedback
- All five workflows added to
dangerous-triggers.ignore(cancel.yml,gemini_code_review.yml,label_prs.yml,pr-bot-pr-updates.yml, andself-assign.yml) legitimately requirepull_request_target,workflow_run, orissue_commenttriggers to operate on fork PRs/issues and do not check out or execute untrusted PR refs. - Using an inline
# zizmor: ignore[template-injection]annotation on theRun Gradle Commandstep in.github/actions/gradle-command-self-hosted-action/action.ymlis appropriate given that callers pass shell-evaluated flags/variables from trusted workflow configs andzizmor.ymldoes not support subpath ignores for composite actions (zizmor#1086).
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @jrmccluskey added as fallback since no labels match configuration 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 semanticsworkflow_dispatchruns (for workflow/action changes) have been verifiedInitiative Progress (as of
2026-11-26 01:08 UTC):19PRs merged so far, with~10more PRs needed to be merged to close out all actionable Code Scanning findings (with#41637disablingNote-levelzizmor/self-repositorywarnings).Code Scanning Remediation Context (End Goal, Scope & Impact)
apache/beam's actionableHighandMediumCode Scanning backlog (CodeQL+zizmor) down to zero.Note-levelzizmor/self-repositorywarnings (~89% of all open alerts) are handled via.github/zizmor.ymlconfig (Disable zizmor self-repository rule in .github/zizmor.yml #41637) rather than churning ~300 workflow files.ZipSlip) fixes in JavaZipFiles.unzipFile(Enforce canonical path prefix check in ZipFiles.unzipFile #41497) and Go xlangexpansionx(Enforce IsLocal and prefix check in expansionx validatePath #41589)High) fixes in shared CI composite actions (Pass inputs via env in build-push-docker-action #41515, Pass inputs and outputs via env in test-arguments-action #41592, Pass inputs and outputs via env in setup-k8s-access #41605) andpr-bot(Pass git argument arrays to @actions/exec in pr-bot updateReviewers #41524)GITHUB_TOKENscoping across CI and release workflows (Harden permissions and setup-node caching in typescript_tests.yml #41499, Scope write permissions to job in update_python_dependencies.yml #41516, Scope write permissions to jobs in cut_release_branch.yml #41522, Add read-only permissions and self-repo actions in python_tests.yml #41526, Add read-only permissions and self-repo actions in java_tests.yml #41626, Add read-only permissions and self-repo actions in local_env_tests.yml #41631) and dead-code removal (Remove unused dind-up-action composite action #41585)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 the remaining 10
High-severityzizmorCode Scanning findings across audited CI bot workflows andgradle-command-self-hosted-actionwhile keeping both rules enforced repository-wide:.github/zizmor.yml(zizmor/dangerous-triggers— #3498, #3499, #3500, #3502, #3503, #3508, #3512): Adds path-scopedignore:entries for the 5 audited PR/issue bot and CI housekeeping workflows (cancel.yml,gemini_code_review.yml,label_prs.yml,pr-bot-pr-updates.yml,self-assign.yml). All 5 requirepull_request_target,workflow_run, orissue_commentto operate on fork PRs/issues, and none check out or execute untrusted PR code..github/actions/gradle-command-self-hosted-action/action.yml(zizmor/template-injection— #130, #131, #132): Adds an inline# zizmor: ignore[template-injection]annotation on theRun Gradle Commandstep (zizmor.ymldoes not yet support subpath ignores for compositeaction.ymlfiles perzizmor#1086). Across all 516 workflow call sites, callers pass shell-quoted multi-word flags,\line continuations, and$VARenvironment references solely from trusted repository configs (matrix.*, staticenv.*, step outputs, and committerworkflow_dispatchinputs) rather than untrusted PR metadata.Verification
zizmor --config .github/zizmor.ymlacross all 6 files (0findings)./gradlew :beam-test-gha:preCommit(BUILD SUCCESSFUL)PreCommit GHA(zizmor-actionSARIF scan + allowlist +gradle-command-self-hosted-actionrunning:beam-test-gha:preCommit): https://github.com/apache/beam/actions/runs/45732594644 (SUCCESS)CodeQL Advanced: https://github.com/apache/beam/actions/runs/45732594517 (SUCCESS)