T08 · Insecure Dependencies
Warning
- Location
- scripts/yf.py:2
- Finding
- Unpinned Runtime Dependencies Create a Supply-Chain Risk## Vulnerability Details **File Location**: `scripts/yf.py`, lines 2-10 **Vulnerability Type**: Unpinned third-party runtime dependencies **Risk Level**: Medium ```python # /// script # dependencies = [ # "yfinance", # "rich", # "pandas", # "plotille", # "matplotlib", # "mplfinance" # ] # /// ``` ### Technical Analysis The inline dependency declaration specifies six third-party packages without exact versions, hashes, or a committed lockfile. The documented execution method uses `uv run --script`, which may resolve and install dependencies when the script is run. Because dependency resolution is not constrained to reviewed artifacts, the effective code executed by the skill can change after the project itself has been audited. A compromised upstream release, malicious dependency takeover, or incompatible future release could be selected automatically. Package build hooks may execute during installation, and imported package initialization code executes with the privileges of the skill process. No evidence indicates that the currently named packages are intentionally malicious. The vulnerability is the absence of dependency integrity and reproducibility controls. ### Attack Path 1. An attacker compromises the distribution account or release process of one of the declared packages or one of its transitive dependencies. 2. The attacker publishes a malicious version that remains compatible with the unconstrained dependency declaration. 3. A user invokes the documented `uv run --script scripts/yf.py ...` command in an environment where dependencies must be resolved. 4. `uv` retrieves and installs the malicious package version. 5. Attacker-controlled code executes through a package build hook or when the package is imported by `scripts/yf.py`. ### Impact Assessment Successful exploitation provides code execution with the same operating-system identity and privileges as the skill process. Depend ...[truncated 436 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version rather than allowing unconstrained resolution. 2. Generate and commit a lockfile that also fixes all transitive dependency versions. 3. Use cryptographic hash verification for downloaded distributions where supported. 4. Prefer an internal or allowlisted package index for production execution. 5. Run dependency vulnerability and provenance checks in CI, including checks for unexpected package ownership or source changes. 6. Update dependencies through a controlled review process rather than resolving new releases automatically at runtime. 7. Execute the skill in a sandbox with minimal filesystem, environment-variable, and network access to reduce the impact of a compromised dependency.
