T08 · Insecure Dependencies
- Location
src/main.py:3- Finding
Unpinned Dependency Is Automatically Resolved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
src/main.py, lines 3-7
Vulnerability Type: Unpinned third-party dependency and unsafe dynamic resolution
Risk Level: MediumVulnerable Code
python # /// script # requires-python = ">=3.12" # dependencies = [ # "yfinance", # ] # ///The documented execution workflow in
SKILL.mdinstructs the Agent to run this script throughuv run, which automatically resolves and installsyfinance.Technical Analysis
The dependency declaration specifies only the package name and does not constrain it to an audited version. The project also contains no reviewed lockfile or package hash. Consequently, the effective code executed by the Skill can change between invocations even when the Skill's own source files remain unchanged.
Importing
yfinanceexecutes Python code from the resolved package and its transitive dependencies with the same operating-system privileges as the Skill process. A compromised package release, compromised package-distribution account, or malicious transitive dependency could therefore introduce arbitrary behavior after this project has been reviewed.This is a supply-chain weakness rather than evidence that the currently published
yfinancepackage is malicious.Attack Path
- An attacker compromises a dependency release channel, maintainer account, or transitive dependency used by
yfinance. - The attacker publishes a version containing malicious initialization or import-time code.
- A user or Agent invokes the documented
uv run src/main.py <TICKER>command. - Because no exact version or reviewed lockfile is enforced,
uvmay resolve and install the compromised release. src/main.pyimportsservice.py, which importsyfinance.- The malicious package code executes with the privileges and accessible environment of the Skill process.
Impact Assessment
Successful exploitation could provide ...[truncated 377 chars]
- An attacker compromises a dependency release channel, maintainer account, or transitive dependency used by
- Remediation
View remediation
Remediation Suggestions
- Pin
yfinanceand every transitive dependency to reviewed, exact versions. - Commit and enforce a generated lockfile rather than resolving unconstrained versions during normal Skill execution.
- Use package hashes or another integrity-verification mechanism where supported.
- Download dependencies only from an explicitly trusted package index over authenticated TLS.
- Build and scan the dependency environment in a controlled release process instead of automatically installing new versions at invocation time.
- Run the Skill in a sandbox with minimal filesystem access, no unnecessary credentials in its environment, and network access restricted to the market-data endpoints required for its declared functionality.
- Establish a reviewed dependency-update process with vulnerability and provenance checks.
- Pin
