T08 · Insecure Dependencies
- Location
dl.py:1- Finding
Runtime Resolution of Unpinned Third-Party Dependencies
- Content
View full analysis
=3.12" # dependencies = [ # "loguru>=0.7.3", # "python-slugify>=8.0.4", # "yt-dlp", # ] # /// ``` ### Technical Analysis The Skill is executed using `uv run --script`, which can resolve and install the dependencies declared in the inline script metadata at invocation time. The `yt-dlp` dependency has no version constraint, while `loguru` and `python-slugify` have only minimum versions and no upper bounds. The project contains no dependency lockfile or package hashes. As a result, executing the same reviewed Skill at different times can load materially different third-party code without any corresponding modification to the project. Imported package code executes within the Python process under the permissions of the user running the Skill. This is not evidence that the current named packages are malicious. The vulnerability is the absence of reproducible dependency controls, which exposes the Skill to compromised releases, maintainer-account compromise, malicious transitive dependencies, or unexpected incompatible updates. ### Attack Path 1. An attacker compromises a declared dependency, one of its transitive dependencies, or the relevant package-publishing account. 2. The attacker publishes a malicious release that satisfies the Skill's unconstrained or open-ended version requirements. 3. A user invokes the Skill through `uv run --script dl.py`. 4. `uv` resolves the malicious release because no exact lock or integrity hash prevents its selection. 5. The malicious package is loaded by the Python process, including through imports such as `import yt_dlp` or `from loguru import logger`. 6. Attacker-controlled code executes with the filesystem, network, and proce ...[truncated 719 chars]- Remediation
View remediation
