Repository navigation
Conversation
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR cleanly remediates the zizmor/template-injection findings in .github/actions/setup-k8s-access/action.yml by passing action inputs and step outputs through step-level env: blocks rather than interpolating ${{ ... }} expressions directly into shell scripts. Shell expansions are properly quoted and TEST_NAMESPACE is sanitized against newline characters before writing to $GITHUB_OUTPUT.
🔍 General Feedback
- All step-level environment variables (including those used in the
pytooling/actions/with-post-steppost execution stage) are properly scoped and evaluated. - Quoting
"${REMOVE_FINALIZER}"inkubectl patchaligns with all existing callers in the repository (which use the single-argument<type>/<name>format).
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @chamikaramj 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-24 20:27 UTC):8PRs merged so far, with~40more 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 all 6 open
zizmor/template-injection(High / error&Note, alerts#168–#173) findings in.github/actions/setup-k8s-access/action.yml:inputs.k8s_namespace,inputs.cluster_name,inputs.cluster_zone,inputs.remove_finalizer, andsteps.replace_namespace.outputs.TEST_NAMESPACEvia step-levelenv:variables instead of interpolating${{ ... }}directly insidebashrun:andwith-post-steppost:scripts.printf '%s' "${K8S_NAMESPACE}" | tr -d '\r\n'before writingTEST_NAMESPACEto$GITHUB_OUTPUTand quote all shell expansions.Verification
beam_PostCommit_Java_InfluxDbIO_IT.yml) on branchcodescan/gha-setup-k8s-access-env: https://github.com/apache/beam/actions/runs/45298583844 (successacrossSet k8s access,Install InfluxDB,Run Java InfluxDbIO_IT, andPost Set k8s accessnamespace cleanup)zizmor --config .github/zizmor.yml --persona=pedantic .github/actions/setup-k8s-access/action.yml(0findings)./gradlew :beam-test-gha:preCommitandbash -n/sh -nacross allrunandpostscripts