subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _run_command(command: list[str], *, env: dict[str, str] | None = None, cwd: Path | None = None, timeout: int = 300) -> dict[str, Any]: completed = subprocess.run( command, cwd=str(cwd) if cwd else None, env=env,- Confidence
- 91% confidence
- Finding
- completed = subprocess.run( command, cwd=str(cwd) if cwd else None, env=env, capture_output=True, text=True, timeout=timeout, )
