T08 · Insecure Dependencies
- Location
scripts/setup_openclaw_bot.sh:20- Finding
Unpinned Python Dependencies Permit Unreviewed Supply-Chain Updates
- Content
View full analysis
Vulnerability Details
File Location:
scripts/setup_openclaw_bot.sh:20-23and installation instruction atscripts/setup_openclaw_bot.sh:207
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable dependency declaration (
scripts/setup_openclaw_bot.sh:20-23):bash # --- requirements.txt --- cat > "$PROJECT_DIR/requirements.txt" << 'EOF' requests>=2.28.0 python-dotenv>=1.0.0 EOFInstallation instruction (
scripts/setup_openclaw_bot.sh:207):bash echo " 3. pip install -r requirements.txt"Technical Analysis
The generated
requirements.txtspecifies only minimum versions. Consequently, each installation may resolve to a different, newly published dependency version that was not present during the Skill audit. The installation command does not require package hashes, use a reviewed lock file, or explicitly enforce a trusted package index.If a permitted dependency version or the configured Python package index is compromised, pip can retrieve an attacker-controlled wheel or source distribution. Source distributions may execute build-related code during installation. A malicious dependency can also execute when the generated bot imports
requestsorpython-dotenv.This is a supply-chain weakness rather than evidence that the currently named packages are malicious.
Attack Path
- An attacker compromises a future permitted release of
requestsorpython-dotenv, compromises a configured package index, or otherwise influences dependency resolution. - The user runs
pip install -r requirements.txtas instructed. - Because the constraints accept all versions at or above the stated minimums and no hashes are checked, pip downloads the attacker-controlled artifact.
- Malicious code executes during source-package build or when the generated bot imports the installed package.
- The malicious dependency reads the gene ...[truncated 997 chars]
- An attacker compromises a future permitted release of
- Remediation
View remediation
Remediation Suggestions
- Replace lower-bound constraints with exact, reviewed versions, for example:
text requests==REVIEWED_VERSION python-dotenv==REVIEWED_VERSION - Generate a lock file containing hashes for every direct and transitive dependency, using a controlled tool such as
pip-compile --generate-hashes. - Install with hash enforcement:
bash python -m pip install --require-hashes -r requirements.lock - Explicitly use an approved HTTPS package index and prevent fallback to untrusted extra indexes.
- Install inside a dedicated virtual environment under a non-privileged account; never run the installation as root.
- Review dependency provenance, release changes, and vulnerability advisories before updating locked versions.
- Protect
.envwith restrictive filesystem permissions, exclude it from version control, and rotateBOT_TOKENimmediately if dependency compromise is suspected.
- Replace lower-bound constraints with exact, reviewed versions, for example:
