subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if os.environ.get("LIFE_COMPANION_NO_AUTOINSTALL"): return False, "auto-install disabled (LIFE_COMPANION_NO_AUTOINSTALL=1)" try: r = subprocess.run( [sys.executable, "-m", "pip", "install", "--quiet", pkg], capture_output=True, text=True, timeout=300, )- Confidence
- 93% confidence
- Finding
- The code invokes `pip install` in a subprocess at runtime, which gives the skill package-execution capability and causes code from external packages to be fetched and installed during normal operation. Even though the command is passed as an argument list rather than a shell string, this still expands the trust boundary to PyPI/network/package metadata and can execute unreviewed install-time code if dependency names or package sources are compromised.
