T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:62
- Finding
- Unpinned Dependency Installation Bypasses System Package Protections## Vulnerability Details **File Location**: `SKILL.md:62` **Vulnerability Type**: Insecure third-party dependency installation **Risk Level**: Medium **Complete Code Snippet**: ```bash # Install yt-dlp (video download) pip3 install --break-system-packages yt-dlp ``` ### Technical Analysis The documented setup command installs the latest available `yt-dlp` release without pinning a reviewed version or verifying an integrity hash. Package resolution is therefore mutable: running the same command at different times may install different code from the configured Python package index. The `--break-system-packages` option also disables the protection applied to externally managed Python environments. This allows `pip` to alter packages associated with the host's system-managed Python installation, increasing the potential for dependency conflicts and damage to applications that share that environment. Exploitation depends on compromise or manipulation of the package supply chain, such as a compromised upstream release, package-index account, index configuration, or network/package mirror. There is no evidence in the audited file that `yt-dlp` itself is malicious; the finding concerns the unsafe installation procedure. ### Attack Path 1. An attacker compromises a future `yt-dlp` release or a package source used by the environment. 2. An operator follows the documented command. 3. `pip` resolves the mutable latest release without checking a pinned version or expected hash. 4. Package-controlled installation or runtime code executes with the permissions of the user running `pip`. 5. Because system-package protection was explicitly bypassed, the installation may also modify or conflict with the system-managed Python environment. ### Impact Assessment A successful supply-chain compromise could execute arbitrary code with the installing user's privileges. It could access data and credentials available to that user, alter use ...[truncated 278 chars]
- Remediation
- ## Remediation Suggestions - Remove `--break-system-packages`. - Install the dependency in an isolated virtual environment or through `pipx`. - Pin `yt-dlp` to a specifically reviewed version rather than installing the mutable latest release. - Use hash verification through a locked requirements file, for example `pip install --require-hashes -r requirements.txt`. - Review and deliberately update the pinned version on a controlled schedule. - Run dependency installation and video processing as an unprivileged user in a constrained environment. - Prefer a trusted internal package mirror with provenance, integrity, and release-approval controls where available. A hardened installation pattern is: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` The requirements file should contain an approved exact version and its expected distribution hashes.
