T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Dependencies Installed Outside the System Package Manager’s Protections## Vulnerability Details **File Location**: `SKILL.md`, lines 12-16 **Vulnerability Type**: Supply-chain exposure through unpinned dependencies and forced global installation **Risk Level**: Medium **Vulnerable code snippet**: ```bash ### 1. Install dependencies pip install cryptography requests --break-system-packages ``` ### Technical Analysis The installation command retrieves the latest available versions of `cryptography` and `requests` without version constraints, hashes, a lock file, or an isolated virtual environment. Consequently, installations performed at different times may execute materially different third-party code than the code considered during this audit. The `--break-system-packages` option bypasses protections intended to prevent `pip` from modifying a Python environment managed by the operating system. If the command is executed with elevated privileges, a compromised dependency or installation hook could alter system-wide Python packages and affect unrelated applications. The package names are legitimate and there is no evidence that either dependency is currently malicious. The vulnerability is the unsafe installation model, which unnecessarily expands the consequences of an upstream package compromise or compromised package index. ### Attack Path 1. An attacker compromises a dependency release, one of its transitive dependencies, the configured Python package index, or the network/package-resolution environment. 2. A user follows the setup instructions at a time when the malicious or otherwise unsafe release is selected. 3. `pip` downloads and executes package build or installation code. 4. Because versions and hashes are not constrained, the malicious release is accepted without an integrity comparison against an audited artifact. 5. If installation occurs in a privileged or system-managed environment, `--break-system-packages` allows the installation to affect the system Python environment an ...[truncated 727 chars]
- Remediation
- ## Remediation Suggestions - Create and use a dedicated virtual environment rather than modifying the system-managed Python environment. - Remove `--break-system-packages` from the documented installation command. - Pin direct and transitive dependencies to reviewed versions in a lock file. - Require package hashes, for example through a generated requirements file used with `pip install --require-hashes`. - Install dependencies as an unprivileged user and explicitly warn users not to run the command with `sudo`. - Use a controlled package index or dependency mirror where practical. - Add automated vulnerability and provenance checks for dependency updates. - Review and deliberately update dependency pins instead of automatically installing the newest release.
