T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Dependencies Installed Outside an Isolated Environment
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12–14
Vulnerability Type: Unpinned third-party dependencies and unsafe package installation guidance
Risk Level: MediumVulnerable Code Snippet:
bash pip3 install yfinance numpy --break-system-packages python3 scripts/analyze.py BTC-USD python3 scripts/analyze.py 0700.HKTechnical Analysis
The installation command retrieves
yfinance,numpy, and their transitive dependencies without specifying approved versions or verifying package hashes. Consequently, the installed code can change between installations without any corresponding change to the reviewed skill package.The
--break-system-packagesoption bypasses protections intended to preventpipfrom modifying an externally managed Python environment. This can cause dependency conflicts or replace packages used by system-level or unrelated Python applications. Although the named packages are legitimate, the documented installation process does not provide version locking, integrity verification, or environment isolation.The project does not contain evidence that it deliberately retrieves and executes a malicious package. The risk arises from the unsafe dependency installation procedure and exposure to compromised releases, dependency substitution, mutable transitive dependencies, and incompatible future versions.
Attack Path
- A user follows the quick-start instructions in
SKILL.md. pip3resolves the latest available versions ofyfinance,numpy, and all transitive dependencies from the configured package index.- An attacker compromises an upstream package or release, or controls a package index configured in the execution environment.
- The malicious package executes installation-time or import-time code.
- When
scripts/analyze.pyimportsyfinanceornumpy, attacker-controlled code executes with the privileges of the user running the command. - Be ...[truncated 916 chars]
- A user follows the quick-start instructions in
- Remediation
View remediation
Remediation Suggestions
-
Remove
--break-system-packagesfrom the installation instructions. -
Require installation inside a dedicated virtual environment:
bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt -
Add a lock file or fully pinned
requirements.txtcontaining exact versions for direct and transitive dependencies. -
Record and enforce cryptographic hashes with
--require-hashes. -
Review dependency updates before changing locked versions and use automated vulnerability scanning.
-
Install from a trusted, explicitly configured package index and prevent fallback to untrusted indexes.
-
Run the analysis under a non-privileged account with only the filesystem and network access required for market-data retrieval.
-
