Skip to content

Pass inputs via env in build-push-docker-action - #41515

Open
derrickaw wants to merge 1 commit into
masterfrom
codescan/gha-build-push-docker-env
Open

derrickaw wants to merge 1 commit into
masterfrom
codescan/gha-build-push-docker-env

Conversation

@derrickaw

@derrickaw derrickaw commented Nov 20, 2026 •

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 4 zizmor/template-injection (High / error, alerts #99, #100, #101, #102) findings in .github/actions/build-push-docker-action/action.yml.
  • Binds inputs.image_name, inputs.image_tag, inputs.dockerfile_path, and inputs.build_context through step env: variables and quotes shell expansions rather than interpolating ${{ inputs.* }} directly into the bash script.

Verification

  • Sample caller workflow run on branch codescan/gha-build-push-docker-env (beam_Inference_Python_Benchmarks_Dataflow.yml, the sole caller of build-push-docker-action): https://github.com/apache/beam/actions/runs/45211019836/job/137993437467 — step Build VLLM Development Image completed with success (downstream multi-hour GPU Dataflow benchmark steps subsequently cancelled after verifying the composite action build + Artifact Registry push).
  • ./gradlew :beam-test-gha:preCommit
  • Validated composite action YAML structure via PyYAML and zizmor (0 findings)

@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 cleanly remediates template injection findings in .github/actions/build-push-docker-action/action.yml by passing composite action inputs through step-level env variables and properly quoting shell expansions. The changes are minimal, idiomatic, and preserve the existing workflow behavior.

🔍 General Feedback

  • All four inputs.* references in the Build and Push Docker Image step (image_name, image_tag, dockerfile_path, and build_context) are properly bound to environment variables and double-quoted in the bash script, including $GITHUB_OUTPUT.

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

@github-actions github-actions Bot added the size/s S: 10-49 lines changed label 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:34
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @tvalentyn added as fallback since no labels match configuration
Backup reviewer: jrmccluskey (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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant