T08 · Insecure Dependencies
Warning
- Location
- yahoo-fantasy-baseball.py:27
- Finding
- Dependency installation without artifact integrity verification## Vulnerability Details **File Location**: `yahoo-fantasy-baseball.py:27-35`; `requirements.txt:1` **Vulnerability Type**: Unverified third-party dependency installation **Risk Level**: Medium The explicit `--setup` operation creates a virtual environment and installs a third-party package from the configured Python package index: ```python def _bootstrap_venv(): """Create a local venv and install requirements.""" print("Installing dependencies...", file=sys.stderr) # Create venv subprocess.check_call( [sys.executable, "-m", "venv", _VENV_DIR], stdout=sys.stderr, stderr=sys.stderr, ) # Install requirements into the venv pip_cmd = [_VENV_PYTHON, "-m", "pip", "install", "-q", "-r", _REQUIREMENTS] subprocess.check_call(pip_cmd, stdout=sys.stderr, stderr=sys.stderr) ``` The dependency manifest contains: ```text yahoo_fantasy_api==2.12.2 ``` ### Technical Analysis The direct dependency is version-pinned, which prevents unintended version upgrades, but neither the package artifact nor its transitive dependencies are protected by cryptographic hashes. The installation therefore trusts the configured pip index, its resolved artifacts, and the complete transitive dependency graph. Python package installation can execute package build logic, while imported dependency code subsequently executes with the same operating-system privileges as the Skill. In this project, the installed Yahoo API and OAuth libraries also receive access to the Yahoo OAuth session and the credential file under `~/.openclaw/credentials/yahoo-fantasy/`. No evidence establishes that `yahoo_fantasy_api==2.12.2` is currently malicious. The confirmed issue is the absence of artifact integrity verification and a fully locked transitive dependency set, leaving a supply-chain compromise capable of changing the code that executes during setup or runtime. ### Attack Path 1. An attacker ...[truncated 1382 chars]
- Remediation
- ## Remediation Suggestions 1. Generate a fully resolved lock file containing exact versions and SHA-256 hashes for the direct package and every transitive dependency. 2. Install with hash enforcement, for example: ```python pip_cmd = [ _VENV_PYTHON, "-m", "pip", "install", "--require-hashes", "-r", _REQUIREMENTS, ] ``` 3. Resolve and review dependencies in a controlled build process rather than dynamically resolving transitive versions on end-user systems. 4. Use an explicitly configured, trusted package index and disable unintended additional indexes. 5. Audit the dependency tree and monitor pinned packages for security advisories and ownership or release anomalies. 6. Consider distributing a signed, reproducibly built environment or verified wheel bundle instead of downloading executable package artifacts during setup. 7. Run setup and normal Skill execution as an unprivileged user, and avoid exposing unrelated credentials in the process environment.
