T08 · Insecure Dependencies
- Location
references/requirements.txt:1- Finding
Unpinned Executable Dependencies Allow Supply-Chain Drift
- Content
View full analysis
=1.0.0 akshare>=1.14.0 yfinance>=0.2.40 ``` `scripts/setup.sh:101-108`: ```bash info "安装 Python 依赖..." if command -v uv &>/dev/null; then uv pip install --python "$VENV_PYTHON" -r "$REQUIREMENTS" else "$VENV_PYTHON" -m pip install --upgrade pip -q "$VENV_PYTHON" -m pip install -r "$REQUIREMENTS" -q fi ``` ### Technical Analysis All three dependencies use minimum-version constraints rather than exact, reviewed versions. Consequently, each installation can resolve a different dependency graph, including future releases that were not part of this audit. The installation process also lacks package hashes or another integrity-verification mechanism. Python packages and their transitive dependencies may execute build-backend or installation-related code during resolution and installation. They are subsequently imported by the MCP server, allowing malicious runtime initialization code to execute as well. This creates a supply-chain exposure if an allowed upstream release or transitive dependency is compromised. The README additionally recommends `npx clawhub@latest`, which similarly resolves a mutable package version, although the confirmed Python dependency issue is directly represented by the requirements file and setup script. ### Attack Path 1. An attacker compromises one of the permitted Python packages, its distribution account, or a transitive dependency. 2. A malicious version is published with a version satisfying the broad `>=` constraint. 3. A user runs `scripts/setup.sh`. 4. `pip` or `uv` resolves and downloads the malicious version because no exact lock or hash restricts it. 5. Malicious code executes du ...[truncated 930 chars]- Remediation
View remediation
