subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
os.makedirs(LOG_DIR, exist_ok=True) try: proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,- Confidence
- 84% confidence
- Finding
- This helper executes pip install commands via subprocess.Popen, and the package name and mirror URL can be influenced by command-line input or caller-supplied values elsewhere in the script. While shell injection is mitigated by using an argv list, the function still enables installation of arbitrary packages from arbitrary indexes, which can lead to execution of untrusted code during package installation in a local environment setup tool.
