T08 · Insecure Dependencies
- Location
src/main.py:3- Finding
Unpinned Third-Party Dependency Is Automatically Resolved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
src/main.py:3-7; supporting documentation atSKILL.md:53-54
Vulnerability Type: Unpinned runtime dependency and software supply-chain exposure
Risk Level: MediumVulnerable Code
src/main.py:3-7:python # /// script # requires-python = ">=3.12" # dependencies = [ # "yfinance", # ] # ///SKILL.md:53-54:markdown ## Notes - `uv run` reads the inline `# /// script` dependency block in `main.py` and auto-installs `yfinance`.Technical Analysis
The inline dependency declaration specifies
yfinancewithout an exact version, lockfile, or package hash. The documented execution method usesuv run, which can resolve and install the dependency when the required environment is not already available.Consequently, the code that executes is not fully represented by the audited project. Its effective behavior depends on whichever compatible
yfinancerelease and transitive dependencies the package resolver selects at installation or update time. If an upstream package, maintainer account, release artifact, or transitive dependency is compromised, malicious code could execute as part of dependency installation, import, or normal library operation.This is a supply-chain weakness rather than evidence that the currently published
yfinancepackage is malicious.Attack Path
- An attacker compromises an upstream dependency release, its publication credentials, or a transitive package used by
yfinance. - A user invokes the documented command in an environment where
uvmust resolve or install dependencies:bash uv run skills/commodities/src/main.py CL=F - Because no audited version or artifact hash is enforced, the resolver selects the compromised compatible release.
- Malicious package code executes during installation, import, or use.
- The payload operates with the permissions and environmental ...[truncated 643 chars]
- An attacker compromises an upstream dependency release, its publication credentials, or a transitive package used by
- Remediation
View remediation
Remediation Suggestions
- Pin
yfinanceto a reviewed exact version rather than leaving it unconstrained:python # dependencies = [ # "yfinance==<reviewed-version>", # ] - Generate and commit a lockfile that fixes all transitive dependency versions.
- Where supported, enforce cryptographic hashes for downloaded package artifacts.
- Configure
uvto use only an approved package index over authenticated TLS. - Perform dependency updates through a controlled review process that includes vulnerability scanning and release-diff inspection.
- Run the Skill in a restricted environment with minimal filesystem permissions, no unnecessary credentials, and limited outbound network access.
- Pin
