subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not HAS_REPORTLAB: print("⚠️ reportlab nie jest zainstalowany. Instaluję...") import subprocess subprocess.run(["pip", "install", "reportlab"], check=True) from reportlab.lib.pagesizes import A4 from reportlab.pdfgen import canvas from reportlab.lib.units import cm- Confidence
- 96% confidence
- Finding
- The function silently invokes pip at runtime to install a dependency, which executes an external package manager subprocess in the user's environment. This expands the skill's capabilities beyond simple PDF generation, can modify the host environment without consent, and may expose the system to dependency confusion, malicious packages, or unintended network and execution side effects.
