T08 · Insecure Dependencies
- Location
generate_pdf.py:20- Finding
Automatic Installation of an Unpinned Runtime Dependency
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Polish leave-request helper mostly matches its purpose, but it automatically installs an unpinned PDF dependency and says employee data is remembered without clear controls.
Review before installing in a shared or managed environment. Prefer preinstalling a pinned reportlab dependency through an approved setup process, avoid letting the skill remember employee personal data unless you know where it is stored and how to delete it, confirm any email recipient and content before sending, and restrict PDF output to a safe folder.
generate_pdf.py:20Automatic Installation of an Unpinned Runtime Dependency
generate_pdf.py:17Arbitrary PDF Output Path Allows Process-Writable File Overwrite
The skill advertises sending leave requests to a supervisor by email, which involves transmitting personal and workplace data, but it provides no warning about what information is sent or the privacy implications of email transmission. Users may expose sensitive HR-related information to unintended recipients or through insecure handling if they are not clearly informed and asked to confirm transmission details.
The skill states that employee data is provided once and then remembered, but it does not disclose how that personal data is stored, for how long, or who can access it. This creates a privacy and compliance risk because users may unknowingly entrust personal and employment-related data to persistent storage without informed consent or retention limits.
The module description and all user-facing strings are fixed in Polish, which imposes a specific language on users without opt-in. The file does not document that the skill is intentionally limited to a Polish-speaking or Poland-specific context.
A simple document generator should not self-expand its privileges by installing software at runtime. Adding package installation behavior introduces supply-chain and execution risk because external code may be fetched and installed when the function is called.
Installing a package automatically without prior confirmation changes the host environment and launches a subprocess as a side effect of ordinary use. In agent or enterprise contexts, this is unsafe because it may bypass expected change controls and network/package policy restrictions.
The function automatically invokes pip via subprocess during normal PDF generation, which grants the skill package-install and code-execution capability unrelated to its primary purpose. This can unexpectedly modify the runtime environment, pull code from external package sources, and fail unpredictably in restricted or production environments.
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
The file's user-facing natural language is entirely in Polish, including usage instructions and the main interface text, with no indication that the user can choose another language. This can violate language/locale policy when a skill imposes a specific language without opt-in or justification.
The file’s natural-language interface, prompts, usage examples, date parsing, and output are all hard-coded in Polish, including Polish month names and user-facing messages. There is no user opt-in, language selection, or documentation that this is intentionally limited to a Poland-specific compliance or regional workflow, which makes it a language/locale policy issue.
The generated document header is hardcoded as a vacation-leave request even when the selected leave type is something else. This can misrepresent HR records, cause users to submit the wrong legal/administrative form, and create workflow or compliance errors for regulated leave categories such as parental or on-demand leave.
The function creates a PDF file containing personal employee information such as name, phone number, and email, and saves it to the provided filename. While there is a success message after saving, there is no prior warning or explanatory comment/docstring disclosing that personal data will be written to local storage.