fix(repo): prevent script injection in release-docker workflow - #3024
Open
kopernic-pl wants to merge 1 commit into
Open
fix(repo): prevent script injection in release-docker workflow#3024kopernic-pl wants to merge 1 commit into
kopernic-pl wants to merge 1 commit into
Conversation
kopernic-pl
requested review from
MichakrawSB,
knieczyszczak,
micryc,
tekyu and
tomaszmichalowski
July 31, 2026 12:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/release-docker.yml${{ expression }}interpolation insiderun:blocks withenv:variable bindings, eliminating the shell script injection attack surfaceghrpublish (line 159), docker push (line 180)Details
Using
${{ inputs.tag }}directly inside arun:block causes GitHub Actions to string-interpolate the value into the shell script before the shell parses it. A value containing shell metacharacters could execute arbitrary commands. The fix passes all context/input values throughenv:so the shell receives them as variable bindings rather than as part of the parsed command string.${{ expression }}usage inwith: ref:fields is intentionally left unchanged — those are YAML values passed to actions, not shell scripts, so they are not subject to this vulnerability.Test plan
Release Docker Imagesworkflow with a valid tag to confirm the workflow still functions correctly🤖 Generated with Claude Code