T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:235
- Finding
- Unpinned Third-Party Python Dependencies## Vulnerability Details **File Location**: `SKILL.md:235` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```python # Requires: pip install pytesseract pdf2image ``` ### Technical Analysis The skill instructs the agent or user to install `pytesseract` and `pdf2image` without specifying reviewed versions, package hashes, a lockfile, or a trusted package index. As a result, dependency resolution occurs at installation time and may retrieve versions that differ from those considered during this audit. Python packages can execute code during installation and later when imported. If a package release or its distribution channel is compromised, following this instruction could run attacker-controlled code under the account performing the installation. No evidence indicates that the named packages are currently malicious. The vulnerability is the uncontrolled and non-reproducible dependency installation process. ### Attack Path 1. A user requests OCR of a scanned PDF. 2. The agent follows the prerequisite documented in `SKILL.md`. 3. The agent runs `pip install pytesseract pdf2image` without version or hash verification. 4. `pip` resolves packages and transitive dependencies from its configured index at that time. 5. If a resolved distribution has been compromised, malicious installation-time or import-time code executes with the privileges of the account running the command. 6. The malicious package could access files, environment variables, and network resources available to that account. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the installing user or agent process. The affected scope could include readable user files, writable project files, environment variables, and network resources accessible from that execution environment. System-level privileges would only be obtained if installation were performed by an already privileged acco ...[truncated 60 chars]
- Remediation
- ## Remediation Suggestions 1. Define reviewed direct and transitive dependency versions in a lockfile or pinned requirements file. 2. Require cryptographic hashes for every distribution, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Configure an explicitly trusted package index or an internally controlled dependency mirror. 4. Periodically scan locked dependencies for known vulnerabilities and review updates before changing pins. 5. Install dependencies in an isolated, least-privileged virtual environment or container. 6. Avoid performing package installation as `root` or another privileged account. 7. Document the supported Python and dependency versions so installations remain reproducible.
