subprocess module call
- Category
- Dangerous Code Execution
- Confidence
- 88% confidence
- Finding
The subprocess call uses an argument list without a shell, so it does not itself introduce shell-command injection. However, the command explicitly disables Chromium's sandbox with --no-sandbox, removing an important containment boundary if rendered content exploits a browser vulnerability. Rendering locally generated Mahjong HTML reduces exposure, and this file alone does not establish an attacker-controlled HTML injection path.
- Content
python f"--screenshot={out.resolve()}", f"--window-size={w},{h}", file_url, ] r = subprocess.run(cmd, capture_output=True, text=True, timeout=90) shutil.rmtree(tmp_profile, ignore_errors=True) if not out.exists():
