T08 · Insecure Dependencies
- Location
scripts/requirements.txt:1- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
scripts/requirements.txt:1-2
Related Location:SKILL.md:9-14
Vulnerability Type: Unconstrained third-party dependency installation
Risk Level: MediumVulnerable code:
text requests yt-dlpThe corresponding installation guidance in
SKILL.mdis:markdown This script automatically checks for and installs its dependencies on first run: - **requests** — Python HTTP library - **yt-dlp** — video downloader If missing, it will attempt to install them via `pip install --user`. You can also: - Pre-install: `pip3 install requests yt-dlp`Technical Analysis
The dependency declarations and documented installation command do not constrain package versions or verify package hashes. Package resolution therefore retrieves whichever releases the configured Python package index currently considers suitable.
If a dependency release, package-index account, index mirror, or package-resolution environment is compromised, installation may introduce malicious code that was not present during this Skill audit. Python packages can execute code during installation and subsequently run with the privileges of the user invoking the Skill.
The documentation also states that the script automatically installs missing dependencies, while the reviewed script contains no such installation implementation. This inconsistency may cause users to rely on installation behavior that the package does not actually provide, although it does not itself create a code-execution path.
Attack Path
- An attacker compromises a future release, maintainer account, package-index mirror, or other distribution path for
requestsoryt-dlp. - A user follows the documented command
pip3 install requests yt-dlp, or installs fromscripts/requirements.txt. - Because no reviewed versions or hashes are enforced, the package manager accepts the compromised distribution. ...[truncated 861 chars]
- An attacker compromises a future release, maintainer account, package-index mirror, or other distribution path for
- Remediation
View remediation
Remediation Suggestions
- Pin both dependencies to versions that have been reviewed and tested:
text requests==REVIEWED_VERSION yt-dlp==REVIEWED_VERSION - Generate and enforce cryptographic hashes for every permitted distribution, using a locked requirements file and:
bash python3 -m pip install --require-hashes -r requirements.lock - Maintain the lock file through a controlled dependency-update process that includes vulnerability scanning, changelog review, and regression testing.
- Install dependencies in an isolated virtual environment rather than the user's global or user-level Python environment.
- Use a trusted package index and configure the installer to reject unexpected indexes or dependency sources.
- Correct
SKILL.mdso that it does not claim automatic installation unless that behavior is deliberately implemented. Prefer explicit, user-approved installation rather than runtime package installation. - Keep browser-cookie access optional and clearly disclosed because a compromised
yt-dlpdependency would inherit the ability to process cookie material when--cookies-from-browseris enabled.
- Pin both dependencies to versions that have been reviewed and tested:
