T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:86
- Finding
- Unpinned Python Dependency Installed Outside an Isolated Environment## Vulnerability Details **File Location**: `SKILL.md:86` **Vulnerability Type**: Unpinned third-party dependency installation with system package safeguards disabled **Risk Level**: Medium **Vulnerable Code**: ```bash pip3 install rich --break-system-packages --quiet ``` ### Technical Analysis The installation command does not pin `rich` to a reviewed version or verify the downloaded distribution using a cryptographic hash. Consequently, the code installed when users follow these instructions can change independently of the audited Skill. The `--break-system-packages` option explicitly bypasses protections intended to prevent `pip` from modifying an externally managed Python environment. This can overwrite or conflict with operating-system-managed packages and increases the blast radius of dependency installation. This is a supply-chain exposure rather than evidence that the current `rich` package is malicious. Exploitation requires compromise of the selected package, its distribution channel, dependency resolution, or the configured Python package index. ### Attack Path 1. An attacker compromises a package release, transitive dependency, package-index account, distribution channel, or user-configured package source involved in resolving `rich`. 2. A user follows the documented installation command. 3. Because no exact version or artifact hash is enforced, `pip` retrieves the attacker-controlled or unexpectedly changed distribution. 4. Package installation logic executes with the privileges of the invoking user. 5. Because `--break-system-packages` permits modification of the externally managed environment, affected Python components may extend beyond this Skill. 6. If the command is run with elevated privileges, the impact may extend to system-wide Python packages and other applications that rely on them. ### Impact Assessment A compromised dependency could execute arbitrary code with the invoking user's privile ...[truncated 437 chars]
- Remediation
- ## Remediation Suggestions - Install dependencies in a dedicated virtual environment rather than the system-managed Python environment. - Remove `--break-system-packages`. - Pin `rich` and any transitive dependencies to reviewed versions. - Use a lock file or requirements file with cryptographic hashes, enforced through `pip install --require-hashes`. - Configure an approved package index and prevent fallback to untrusted indexes. - Document installation without administrative privileges. - Add automated dependency scanning and periodically review pinned versions for known vulnerabilities. Example hardened workflow: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ```
