subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_command(cmd: List[str], timeout: int = 300, cwd: str = None) -> Tuple[bool, str, str]: """Run a shell command and return success status, stdout, stderr.""" try: result = subprocess.run( cmd, capture_output=True, text=True,- Confidence
- 95% confidence
- Finding
- The script invokes subprocesses to run pip, pytest, and direct Python commands against user-supplied package names and downloaded package content. Although shell=True is not used, this still executes untrusted code locally, which is dangerous in a compatibility-checking skill because package install hooks, imports, and tests can perform arbitrary actions on the host.
