T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Dependencies and Unsafe System-Wide Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17`; related dependency declaration at `scripts/html_to_pdf.py:3-6` **Vulnerability Type**: Unpinned third-party dependencies and unsafe package installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install pandas openpyxl --break-system-packages -q ``` The PDF conversion script also declares an unconstrained dependency: ```python # /// script # requires-python = ">=3.10" # dependencies = [ # "playwright", # ] # /// ``` ### Technical Analysis The installation instructions do not constrain `pandas` or `openpyxl` to reviewed versions or verify package hashes. The inline dependency declaration likewise allows the package resolver to retrieve any compatible version of `playwright`. Using `--break-system-packages` bypasses Python's externally managed environment protection. This may overwrite or conflict with operating-system-managed packages, unnecessarily expanding the effect of the Skill's dependency installation beyond an isolated project environment. This behavior introduces supply-chain and environment-integrity risks: 1. A compromised or unexpectedly modified dependency release may be selected at installation time. 2. Package installation code executes with the privileges of the user running the command. 3. System Python packages may be replaced or left in an inconsistent state. 4. A future dependency release could behave differently from the version originally reviewed. There is no evidence that the named packages are malicious. The vulnerability is the absence of version and integrity controls combined with instructions to bypass system package-management safeguards. ### Attack Path 1. An attacker compromises a permitted dependency release, its distribution account, or the package-resolution path. 2. The user follows the documented installation command or runs the inline dependency script. 3. The resolver downloads the malicious or unexpectedly changed package becau ...[truncated 870 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `--break-system-packages` from all installation instructions. 2. Create and use an isolated virtual environment or another reproducible project environment. 3. Pin every dependency to an exact reviewed version. 4. Maintain a lock file containing transitive dependency versions. 5. Require cryptographic hashes where supported, such as with `pip install --require-hashes`. 6. Configure an approved package index rather than relying on unrestricted resolver configuration. 7. Pin the Playwright version in the inline dependency metadata. 8. Document and pin the compatible Chromium/browser revision used by Playwright. 9. Regularly scan locked dependencies for known vulnerabilities and review updates before changing the lock file. For example: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt ``` ]]>
