T08 · Insecure Dependencies
- Location
- SKILL.md:22
- Finding
- Unpinned System-Wide Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22-28` **Additional Locations**: `download_latest.py:37-39`, `_meta.json:6-9` **Vulnerability Type**: Unpinned third-party dependency and unsafe system-wide installation guidance **Risk Level**: Medium ### Vulnerable Code ```bash pip install -U yt-dlp --break-system-packages # Linux system Python # or pip install -U yt-dlp # virtualenv / macOS yt-dlp --version # verify install ``` The helper also recommends the same mutable installation source: ```python print(" To install it, run ONE of the following commands yourself:") print(" pip install -U yt-dlp") print(" pip install -U yt-dlp --break-system-packages (Linux system Python)") ``` The dependency declaration specifies only the package name: ```json "dependencies": { "required": ["yt-dlp"], "optional": ["ffmpeg"], "notes": "ffmpeg is required when merging separate video+audio streams (bestvideo+bestaudio format). Without it, yt-dlp will fall back to a single-stream format." } ``` ### Technical Analysis The installation instructions retrieve the latest available `yt-dlp` release without a version constraint, cryptographic hash, lockfile, or documented trusted package index. Consequently, the code ultimately executed by the Skill can change after the Skill itself has been reviewed. The `--break-system-packages` option further weakens isolation by permitting installation into a system-managed Python environment. This can overwrite or conflict with operating-system-managed packages and increases the effect of a compromised or incompatible dependency. The project does not automatically run the installation command, and `check_ytdlp()` only displays instructions when the executable is unavailable. This reduces immediate exploitability, but users following the documented prerequisite procedure remain exposed to supply-chain and environment-integrity risks. ### Attack Pa ...[truncated 1286 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `yt-dlp` to a specifically reviewed version instead of installing the latest release: ```bash python -m pip install "yt-dlp==REVIEWED_VERSION" ``` 2. Publish and verify hashes, preferably through a hash-locked requirements file: ```text yt-dlp==REVIEWED_VERSION --hash=sha256:EXPECTED_HASH ``` Install it with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Use a dedicated virtual environment or another isolated runtime rather than modifying system Python. 4. Remove the `--break-system-packages` recommendation from both `SKILL.md` and `download_latest.py`. 5. Document the expected package source and use an explicitly configured trusted index. 6. Test and review dependency updates before changing the pinned version. 7. Record dependency versions and hashes in `_meta.json` or a standard lockfile so the reviewed and installed dependency sets are reproducible. ]]>
