subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
except ImportError: print("Installing mysql-connector-python...", file=sys.stderr) import subprocess subprocess.check_call([ sys.executable, "-m", "pip", "install", "--break-system-packages", "-q", "mysql-connector-python" ])- Confidence
- 93% confidence
- Finding
- The script automatically executes a pip install at runtime if mysql.connector is missing, which causes unreviewed code download and execution in the current environment. Even though the package name is hardcoded, this expands the skill from key rotation into package management and can be abused in hostile or controlled package-index/network environments.
