T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:34
- Finding
- Unpinned Python Testing Dependencies## Vulnerability Details **File Location**: `SKILL.md`, line 34 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```markdown 1. **Dependencies**: `pip install pytest pytest-cov pytest-asyncio pytest-mock` ``` ### Technical Analysis The installation command does not specify reviewed package versions, a lock file, or integrity hashes. Consequently, package resolution may produce different dependency sets over time. If a future package release or one of its transitive dependencies is compromised, following this instruction could install attacker-controlled code into the user's Python environment. Python packages may execute code during build or installation, and installed pytest plugins may also load automatically when tests run. This is a supply-chain hardening issue. The reviewed package names appear legitimate, and the audit found no evidence that the Skill intentionally directs users to typosquatted or malicious packages. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or the associated publishing account. 2. The attacker publishes a malicious release that remains compatible with unconstrained dependency resolution. 3. A user follows the Skill's Quick Start command. 4. `pip` resolves and downloads the compromised release. 5. Malicious code executes during package build, installation, import, or pytest plugin loading. 6. The code gains the permissions of the user or CI account running the command. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the account performing installation or running pytest. On a developer workstation, this could expose source code, accessible credentials, environment variables, and writable files. In CI, it could affect checked-out repository content, build artifacts, and secrets made available to the job. The scope i ...[truncated 96 chars]
- Remediation
- ## Remediation Suggestions - Replace unconstrained installation instructions with a reviewed requirements or lock file. - Pin direct and transitive dependencies to exact versions. - Generate and verify package hashes where practical, such as with `pip install --require-hashes`. - Use an isolated virtual environment rather than installing into a system Python environment. - Enable automated dependency vulnerability scanning and controlled update review. - Document a reproducible workflow, for example: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements-test.txt ``` - Regenerate pins and hashes through a trusted update process rather than accepting arbitrary latest releases.
