T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:57
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, line 57 **Vulnerability Type**: Unpinned Python package installation **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install reportlab ``` ### Technical Analysis The installation instructions retrieve and install the version of `reportlab` selected by the active Python package index at installation time. The project does not provide a pinned version, cryptographic hashes, a lockfile, an explicitly trusted package index, or environment-isolation guidance. Consequently, the dependency installed by a user or agent can differ from the version considered during this audit. If the package distribution, dependency chain, package index, or local index configuration is compromised, package-controlled code could run during installation or when `scripts/gen_invoice.py` imports ReportLab. The audited invoice script itself contains no remote payload retrieval or malicious dependency manipulation. The risk arises from the unsafe, non-reproducible dependency installation procedure. ### Attack Path 1. An attacker compromises a relevant package release or dependency, or influences the package index used by the target environment. 2. A user or AI agent follows the documented command: ```bash pip3 install reportlab ``` 3. `pip` resolves and downloads an unverified package version from the configured index. 4. Malicious package code executes during installation or when the invoice script imports the installed package. 5. The malicious code operates with the privileges of the user or agent that performed the installation or invoked the script. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the installing or invoking account. Depending on that account's permissions, the attacker could access user-readable files, modify user-writable data, steal credentials available to the process, or execute additional local or network actions. The issue doe ...[truncated 279 chars]
- Remediation
- ## Remediation Suggestions 1. Pin ReportLab to a reviewed, exact version rather than installing the latest available release: ```text reportlab==REVIEWED_VERSION ``` 2. Generate and commit a hash-locked requirements file, then require hash validation: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Include hashes for every transitive dependency and regenerate them only through a controlled dependency-update process. 4. Document installation inside a dedicated virtual environment so the package does not alter the global Python environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Explicitly use an approved HTTPS package index and prevent untrusted extra indexes or mirrors from participating in resolution. 6. Regularly review pinned dependencies for known vulnerabilities and update the lockfile through a tested, auditable process. 7. Advise users not to run package installation commands with administrative privileges unless strictly required.
