Repository navigation
Add regression tests for package argument injection - #75686
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs to troubleshoot the error. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Warning Threat detection engine error Threat detection could not complete its analysis due to a tooling error. This is not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs to troubleshoot the error. Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
There was a problem hiding this comment.
🟡 Changes recommended
An active moderate finding remains because the regression test does not cover the additional command-substitution inputs required to verify the uv-specific subprocess boundary.
1 open issue
What changed in this PR
Adds regression tests for Python package argument injection, verifying hostile package names are rejected before pip or uv subprocess execution.
Changes:
- Expands
pipcoverage for semicolons, command substitution, backticks, and option injection. - Adds a fake
uvexecutable to verify invalid package input is not invoked. - Leaves the already-safe JavaScript callsites unchanged.
- The
uvsubprocess-boundary test should also coverpkg$(whoami)andpkg`whoami`.
| File | Summary |
|---|---|
pkg/workflow/argument_injection_test.go |
Adds regression coverage for hostile package names in pip and uv validation paths; the uv test currently covers only the semicolon form. |
Review effort: Lite (auto)
|
|
||
| compiler := NewCompiler() | ||
| err := compiler.validateUvPackages(&WorkflowData{ | ||
| CustomSteps: "uvx pkg;whoami", |
|
🎉 This pull request is included in a new release. Release: |

Sighthound reported command-injection risks in Python package validation and JavaScript subprocess calls. The current callsites already use strict package-name validation and shell-free execution; this change strengthens regression coverage for hostile package names.
Pip and uv validation
pkg$(whoami)must not reach pip or uv.JavaScript callsites