subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 3. Install dependencies pkgs_to_install = ["pytest"] + extra_pkgs pip_result = subprocess.run( [pip_exe, "install"] + pkgs_to_install, capture_output=True, text=True, timeout=120 )- Confidence
- 97% confidence
- Finding
- This subprocess call invokes pip to install packages derived from user-controlled --require inputs. Even though shell injection is avoided by passing an argument list, this still grants package installation and network-fetch capability, enabling execution of attacker-chosen package setup/build code or dependency side effects inside the sandbox.
