Skip to content

Potential fix for code scanning alert no. 26: Code injection#51

Merged
tangrufus merged 1 commit into
mainfrom
alert-autofix-26
Apr 11, 2026
Merged

Potential fix for code scanning alert no. 26: Code injection#51
tangrufus merged 1 commit into
mainfrom
alert-autofix-26

Conversation

@tangrufus
Copy link
Copy Markdown
Member

Potential fix for https://github.com/typisttech/.github/security/code-scanning/26

Use an intermediate environment variable for inputs.strategy and reference it in the shell as $STRATEGY instead of ${{ inputs.strategy }} inside the run: line.

Best minimal fix in .github/workflows/dependabot-auto-merge.yml:

  • In the merge step (around current lines 45–53), change:
    • run: gh pr merge --auto "--${{ inputs.strategy }}" "$PR_URL"
      to:
    • run: gh pr merge --auto "--$STRATEGY" "$PR_URL"
  • Add STRATEGY: ${{ inputs.strategy }} under that step’s env: block.

This preserves behavior (still produces --merge, --squash, or --rebase) while removing direct expression interpolation in shell command context.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@tangrufus tangrufus marked this pull request as ready for review April 11, 2026 19:36
@tangrufus tangrufus merged commit 9974704 into main Apr 11, 2026
3 checks passed
@tangrufus tangrufus deleted the alert-autofix-26 branch April 11, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant