T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Third-Party Dependencies Enable Supply-Chain Compromise
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:25-27andinstructions.md:25-27
Vulnerability Type: Unpinned and unverifiable third-party dependencies
Risk Level: MediumComplete vulnerable code snippet:
text ## Requirementsbash pip install pandas pandas-ta yfinance plotlyThe same installation instructions appear in both affected files.
Technical Analysis
The documented installation command retrieves four packages without pinned versions, cryptographic hashes, a lockfile, or an explicitly trusted package index. Package resolution therefore depends on mutable package-index state and the user's local
pipconfiguration.Python package installation can execute package-controlled build code. If a package release, transitive dependency, configured package index, or similarly named package is compromised, malicious code could execute during installation. Because no hashes are specified,
pipcannot verify that users receive artifacts reviewed by the project publisher.This also prevents reproducible installation: two users running the same command at different times may receive materially different dependency versions and code.
Attack Path
- An attacker compromises a listed package, one of its transitive dependencies, or a package source configured in the victim's
pipenvironment. - The attacker publishes a malicious distribution or modifies a package artifact that remains compatible with the unconstrained dependency request.
- A user follows the documented command:
bash pip install pandas pandas-ta yfinance plotly pipresolves and downloads the attacker-controlled package because no approved versions or hashes constrain resolution.- Malicious build or installation logic executes with the privileges of the user running
pip. - The installed package can continue executing when imported by downstream Python code.
Impact Assessmen
...[truncated 714 chars]
- An attacker compromises a listed package, one of its transitive dependencies, or a package source configured in the victim's
- Remediation
View remediation
Remediation Suggestions
- Replace the free-form installation command with a reviewed requirements or lock file containing exact versions.
- Generate and record SHA-256 hashes for every direct and transitive dependency, then install with hash verification:
bash python -m pip install --require-hashes -r requirements.txt - Use a dependency-management process that resolves and locks transitive dependencies, such as
pip-tools, Poetry, or an equivalent reproducible workflow. - Explicitly document the trusted package index and prevent unintended fallback to untrusted indexes.
- Install dependencies in a dedicated, non-privileged virtual environment rather than globally or as an administrative user.
- Review locked dependency artifacts and use automated vulnerability and provenance scanning before publishing updates.
- Apply the corrected dependency instructions consistently to both
SKILL.mdandinstructions.md.
