Skip to content

Comments

Fix script injection vulnerability in setup-python-env composite action#19

Merged
pmalarme merged 2 commits intofeature/add-documentation-and-copilot-instructionsfrom
copilot/sub-pr-18
Feb 19, 2026
Merged

Fix script injection vulnerability in setup-python-env composite action#19
pmalarme merged 2 commits intofeature/add-documentation-and-copilot-instructionsfrom
copilot/sub-pr-18

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

${{ inputs.extra-args }} was interpolated directly into the shell run: block, allowing expression evaluation before shell execution — a classic GitHub Actions script injection vector.

Changes

  • .github/actions/setup-python-env/action.yml: Route inputs.extra-args through an EXTRA_ARGS env var; reference it as $EXTRA_ARGS in the shell script so the value is treated as data, not executable syntax. Adds # shellcheck disable=SC2086 to document intentional word-splitting.
# Before — vulnerable: expression evaluated before shell runs
uv sync $args ${{ inputs.extra-args }}

# After — safe: value bound to env var, shell sees it as data
env:
  EXTRA_ARGS: ${{ inputs.extra-args }}
run: |
  # shellcheck disable=SC2086  # intentional word-splitting for uv flags
  uv sync $args $EXTRA_ARGS

Testing

  • Not run (why?)
  • uv run poe check
  • Other: YAML-only change; no Python code paths affected. Verified file diff manually.

Checklist

  • Linked issue or task reference
  • Added/updated tests where relevant
  • Updated docs/README if needed
  • No secrets or sensitive data added
  • Considered backward compatibility and deployment impact

Additional context


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…extra-args

Co-authored-by: pmalarme <686568+pmalarme@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on documentation and copilot instructions Fix script injection vulnerability in setup-python-env composite action Feb 19, 2026
Copilot AI requested a review from pmalarme February 19, 2026 11:48
@pmalarme pmalarme marked this pull request as ready for review February 19, 2026 11:52
@pmalarme pmalarme merged commit 03681a0 into feature/add-documentation-and-copilot-instructions Feb 19, 2026
10 checks passed
@pmalarme pmalarme deleted the copilot/sub-pr-18 branch February 19, 2026 11:54
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.

2 participants