subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
chk = subprocess.run([PYBIN, "-c", "import PIL"], capture_output=True) if chk.returncode != 0: log("[python] installing Pillow into isolated venv ...") r = subprocess.run([PIPBIN, "install", "-q", "Pillow"], capture_output=True, text=True) if r.returncode != 0: log("[python] Pillow install failed: %s" % (r.stderr or "")[-300:]) return False- Confidence
- 82% confidence
- Finding
- This code automatically installs `Pillow` at runtime by invoking `pip`, which introduces a supply-chain and unexpected code-execution risk if package indexes, TLS trust, or local pip configuration are compromised. In a skill context that processes untrusted content, silently fetching and executing third-party package installation steps increases attack surface beyond the animation task itself.
