Skip to content

[Aikido] AI Fix for Template Injection in GitHub Workflows Action - #2

Open
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-sast-195516777-bpdw
Open

aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-sast-195516777-bpdw

Conversation

@aikido-autofix

Copy link
Copy Markdown

Description

This patch mitigates template injection vulnerabilities in GitHub Workflows by replacing direct references with an environment variable.

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feat/fix is effective and works
  • New and existing tests pass locally with my changes

Observations

High confidence: Aikido has a robust set of benchmarks for similar fixes, and they are proven to be effective.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 04:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The publish workflow leaves $VERSION unquoted, allowing version inputs containing whitespace to inject additional npm arguments such as --force.

1 open issue
What changed in this PR

This PR mitigates shell-template injection in the React Native publishing workflow by passing the version input through an environment variable.

Changes:

  • Adds a step-level VERSION environment variable.
  • Replaces direct GitHub Actions expression interpolation in the npm version command with shell-variable expansion.
File Description
.github/​workflows/​publish-rn.yml Updates how the version input reaches the version-bump command.

Review effort: Balanced

run: npm version ${{ inputs.version }} --no-git-tag-version
env:
VERSION: ${{ inputs.version }}
run: npm version $VERSION --no-git-tag-version
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