subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"Install command must be a direct executable invocation without shell operators: " + ", ".join(sorted(set(bad))) ) return subprocess.run(argv, cwd=str(cwd) if cwd else None, text=True, capture_output=True) def maybe_json(text: str):- Confidence
- 88% confidence
- Finding
- This line executes a user-supplied install command after only filtering a small set of shell metacharacters. Although shlex.split and shell=False avoid classic shell injection, the code still permits arbitrary executable invocation and attacker-controlled arguments, so a malicious skill install string can run any program available to the user.
