Skip to content

[build] Avoid interpolating Git ref names directly into run: shell commands - #2944

Open
theinfosecguy wants to merge 1 commit into
linkedin:mainfrom
theinfosecguy:fix/workflow-tag-command-injection
Open

[build] Avoid interpolating Git ref names directly into run: shell commands#2944
theinfosecguy wants to merge 1 commit into
linkedin:mainfrom
theinfosecguy:fix/workflow-tag-command-injection

Conversation

@theinfosecguy

@theinfosecguy theinfosecguy commented Jul 29, 2026

Copy link
Copy Markdown

Problem Statement

The two archive-publication workflows interpolated a Git tag name directly into a run: shell command via ${{ github.ref_name }} / ${{ env.GIT_TAG }}. Tag names can contain shell metacharacters, so this splices arbitrary text into the command line of a step that carries JFrog release credentials.

Solution

Pass the tag name through a quoted shell environment variable ("$REF_NAME" / "$GIT_TAG") so it is treated as data, not shell syntax. No change to the version passed to Gradle for normal tags.

How was this PR tested?

  • N/A, workflow-only change; version value is unchanged for normal tags.

Does this PR introduce any user-facing or breaking changes?

  • No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant