subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return yfinance except ImportError: import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "yfinance", "-q"]) import yfinance return yfinance- Confidence
- 95% confidence
- Finding
- The script executes a subprocess to run `pip install yfinance` at runtime. Even though the package name is hardcoded and there is no direct command injection here, runtime package installation expands the attack surface by allowing network fetches and code execution during install, creating supply-chain and environment-integrity risk.
