os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
from reportlab.lib.units import inch except ImportError: print("Warning: reportlab not installed. Installing required package...") os.system(f"{sys.executable} -m pip install reportlab -q") from reportlab.lib import colors from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle- Confidence
- 98% confidence
- Finding
- The code executes a shell command to install a package at runtime using os.system. Even though the command string is mostly fixed, this still grants the skill host-level command execution and performs unexpected networked package installation during normal document generation, which is risky in a healthcare-context tool handling sensitive data.
