Skip to content

command-injection: pin four decided cases of #208 in tests #219

Closed

Description

@SizzleUnrlsd

Problem

Four calls behave as decided in #208 (checked in review of #217) but are not pinned by tests/test_command_arguments.py, so a later change could alter them unnoticed:

Call Expected
subprocess.run(["pwsh", "-command", "&", x]) high, vulnerability (every element after -command is the command)
subprocess.run(["pwsh", "-Command", "Get-Item", x]) high, vulnerability
subprocess.run(["node", "-pe", "CODE", f"v{x}"]) refuted (an argument of the code, behind a constant prefix)
subprocess.run(["pwsh", "-File", "s.ps1", x]) medium, vulnerability (an argument of the script)

Expected

Add the four cases to the parametrised table of tests/test_command_arguments.py (a new-test change only; no existing assertion changes).

Activity

  1. added
    choreMaintenance: releases, build, CI and refactoring
    on Oct 7, 2026
  2. added a commit that references this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance: releases, build, CI and refactoring

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions