T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:63
- Finding
- Unpinned Dependency Installed into the System Python Environment## Vulnerability Details **File Location**: `SKILL.md:63` **Vulnerability Type**: Insecure third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install rich --break-system-packages --quiet ``` ### Technical Analysis The installation command downloads `rich` without pinning an exact reviewed version or verifying an integrity hash. Consequently, the installed artifact can vary over time and depends on the configured package index and resolver state. If the package, one of its dependencies, or the configured index is compromised, malicious package code could execute during installation or when the scanner imports `rich`. The `--break-system-packages` option bypasses Python's externally managed environment safeguard. This permits pip to alter the system-managed Python environment, increasing the potential for dependency conflicts and expanding the impact beyond an isolated Skill environment. No dependency confusion or package compromise is demonstrated in the audited artifact; the finding concerns the unsafe dependency acquisition and installation mechanism. ### Attack Path 1. An attacker compromises the configured pip index, the published `rich` distribution, or a dependency selected by the resolver. 2. A user follows the Skill's installation instruction. 3. `pip3` retrieves an unpinned and unverified artifact from the configured index. 4. Installation-time package behavior may execute under the privileges of the user running pip. 5. Because `--break-system-packages` is enabled, the package can modify the system Python environment rather than an isolated virtual environment. 6. The scanner later imports `rich`, providing another opportunity for compromised dependency code to execute. ### Impact Assessment Successful exploitation could execute code with the privileges of the user running the installation or Skill. Within those privileges, malicious dependency code could access l ...[truncated 358 chars]
- Remediation
- ## Remediation Suggestions 1. Create and use a dedicated virtual environment instead of modifying system Python. 2. Remove `--break-system-packages`. 3. Pin `rich` and any transitive dependencies to reviewed versions. 4. Use a lock file or requirements file containing cryptographic hashes, and install with `pip install --require-hashes`. 5. Configure an explicitly trusted package index and prevent fallback to uncontrolled indexes. 6. Run installation and scanning as an unprivileged user. 7. Avoid `--quiet` in security-sensitive installation instructions so package source, resolver, and integrity errors remain visible. Example hardened workflow: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` The corresponding `requirements.txt` should contain an exact reviewed version and hashes for every resolved package.
