T08 · Insecure Dependencies
- Location
scripts/setup.sh:17- Finding
Unpinned Third-Party Packages Installed During Setup
- Content
View full analysis
/dev/null || pip install -q requests wechatpy 2>/dev/null || true ``` ### Technical Analysis The setup script installs the latest available versions of `requests` and `wechatpy` from the invoking environment's configured Python package index. It does not constrain package versions, verify package hashes, use a lock file, or isolate installation in a virtual environment. The `wechatpy` dependency is also not used by the supplied source code, meaning its installation unnecessarily increases the supply-chain attack surface. Redirecting standard error and ending the command chain with `|| true` can conceal installation failures or suspicious resolver behavior. Package installation can execute package build and installation logic with the privileges of the user running the setup script. If the configured package index, dependency account, DNS path, or a future package release is compromised, attacker-controlled installation code could run locally. ### Attack Path 1. An attacker compromises a package release, dependency account, package mirror, or pip index configuration used by the target. 2. The user runs `scripts/setup.sh`. 3. The unpinned `pip install` command resolves and downloads the attacker-controlled package version. 4. Package build or installation logic executes with the setup user's privileges. 5. The attacker can access or modify resources available to that user, including OpenClaw workspaces and credential files. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the account running setup. The resulting access may include modification of OpenClaw scripts, theft of WeChat or DMX credentials accessible to that user, alteration of generated content, ...[truncated 210 chars]- Remediation
View remediation
