subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print(f" {pkg} -- already installed") except ImportError: print(f" {pkg} -- installing...") subprocess.check_call( [sys.executable, "-m", "pip", "install", pkg], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,- Confidence
- 96% confidence
- Finding
- The setup script automatically runs 'pip install' at execution time, which performs network access and installs code into the local Python environment before the rest of the wallet setup proceeds. In a security-sensitive wallet bootstrap script, this expands the trust boundary to PyPI/package resolution and can lead to arbitrary code execution through malicious, compromised, or dependency-confused packages.
