subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("Installing pyautogui...", file=sys.stderr) import subprocess subprocess.check_call( [sys.executable, "-m", "pip", "install", "pyautogui", "-q"], stdout=subprocess.DEVNULL )- Confidence
- 97% confidence
- Finding
- The script automatically installs pyautogui at runtime via pip, which gives a GUI-control skill unnecessary package-management and external code download capability. Even though shell injection is not present because arguments are passed as a list, this still changes the host environment and executes newly downloaded code without explicit approval, increasing supply-chain and policy-bypass risk.
