subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run(cmd, cwd=None): """Run a command and return (returncode, stdout, stderr)""" result = subprocess.run(cmd, shell=True, capture_output=True, text=True, cwd=cwd) return result.returncode, result.stdout, result.stderr def git_rebase_interactive(base, autosquash=False):- Confidence
- 99% confidence
- Finding
- The helper uses subprocess.run(..., shell=True) and multiple tool functions interpolate untrusted JSON fields directly into shell command strings. Parameters such as base, branch, path, repo_url, title, body, head, and commit_hash can contain shell metacharacters, enabling arbitrary command execution on the host running the skill.
