os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
from PIL import Image except ImportError: print("Installing Pillow...", file=sys.stderr) os.system(f"{sys.executable} -m pip install Pillow requests -q") from PIL import Image try:- Confidence
- 94% confidence
- Finding
- The script executes a shell command to install packages at runtime using os.system, which is unsafe and unnecessary for an image helper. Even though the command string is not directly user-controlled here, it enables unreviewed code execution from external package repositories and creates a dangerous precedent of invoking the shell during normal skill operation.
