T08 · Insecure Dependencies
- Location
src/main.py:5- Finding
Automatic Installation of an Unpinned Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Location:
src/main.py:5-9andSKILL.md:26-32
Vulnerability Type: Unpinned and mutable third-party dependency
Risk Level: MediumThe executable declares
yfinancewithout an exact version, while the documented invocation instructsuv runto resolve and install the dependency automatically.python # /// script # requires-python = ">=3.12" # dependencies = [ # "yfinance", # ] # ///The corresponding execution instructions are:
markdown ```bash uv run /root/.openclaw/workspace/skills/stock-fundamentals/src/main.py <TICKER>>
uv runreads the inline dependency block at the top ofmain.pyand auto-installsyfinancein an isolated environment. No pip install or venv setup needed.text ### Technical Analysis The dependency declaration does not constrain `yfinance` to a specific, reviewed release, and the project contains no lockfile or package-integrity hashes. Consequently, the code executed by the Skill can change between invocations even when the project itself remains unchanged. Python packages can run code during installation and when imported. Because `src/service.py` imports `yfinance` at module initialization, any malicious or compromised version selected by the package resolver could execute code under the identity and permissions of the process running the Skill. An isolated dependency environment limits package conflicts but does not prevent package code from accessing resources available to the invoking user. This is a supply-chain exposure rather than evidence that the current `yfinance` package is malicious. The risk arises from automatically trusting future mutable releases without version or integrity controls. ### Attack Path 1. An attacker compromises the upstream `yfinance` project, a maintainer account, or its package-distribution channel and publishes a malicious release. 2. A user or Agent invokes the documen ...[truncated 1003 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin
yfinanceto an exact reviewed version in the inline dependency declaration, for example:python # dependencies = [ # "yfinance==REVIEWED_VERSION", # ] -
Generate and commit a lockfile that records the complete transitive dependency graph.
-
Enforce locked or frozen resolution during execution so an invocation fails rather than silently selecting newer packages.
-
Verify package artifacts with cryptographic hashes where the package-management workflow supports them.
-
Review dependency updates before changing the pinned version, including transitive dependency and provenance changes.
-
Run the Skill under a least-privileged account or sandbox with restricted filesystem access, sanitized environment variables, and network access limited to required financial-data endpoints.
-
Add automated dependency vulnerability and integrity scanning to the release process.
-
