Skip to content

Add regression tests for package argument injection - #75686

Merged
pelikhan merged 2 commits into
mainfrom
copilot/sighthound-security-findings-fix
Nov 7, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/sighthound-security-findings-fix

Conversation

Copilot AI commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

    • Test that semicolons, command substitution, and backticks are rejected before subprocess execution.
    • Example input: pkg$(whoami) must not reach pip or uv.
  • JavaScript callsites

    • The cited Pi and CA tests already use shell-free APIs; the cited issue test has no subprocess call. No JavaScript changes are needed.

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix critical command injection vulnerabilities in pip validation Add regression tests for package argument injection Nov 7, 2026
Copilot AI requested a review from gh-aw-bot November 7, 2026 14:35
@pelikhan
pelikhan marked this pull request as ready for review November 7, 2026 14:48
Copilot AI adaptive review requested due to automatic review settings November 7, 2026 14:48
@pelikhan
pelikhan merged commit 14d7efd into main Nov 7, 2026
51 checks passed
@pelikhan
pelikhan deleted the copilot/sighthound-security-findings-fix branch November 7, 2026 14:48
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection results could not be parsed.

Review the workflow run logs to troubleshoot the error.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~1 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #75686

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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 happened

The threat detection results could not be parsed.

Review the workflow run logs to troubleshoot the error.

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt56 max · ~2 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75686

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: opus55 medium · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 pip coverage for semicolons, command substitution, backticks, and option injection.
  • Adds a fake uv executable to verify invalid package input is not invoked.
  • Leaves the already-safe JavaScript callsites unchanged.
  • The uv subprocess-boundary test should also cover pkg$(whoami) and pkg`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",
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sighthound] Security findings in github/gh-aw

4 participants