T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Mutable and Unpinned Third-Party Dependencies
- Content
View full analysis
=2.31.0 beautifulsoup4>=4.12.0 lxml>=4.9.0 schedule>=1.2.0 python-dotenv>=1.0.0 pyyaml>=6.0 ``` The README also directs users to execute a mutable version of external installation tooling: ```bash npx clawhub@latest install openclaw-community/skill-library-book-monitor ``` The Skill setup instructions install all dependencies without hashes or a lock file: ```bash pip install -r requirements.txt ``` ### Technical Analysis All Python requirements use lower-bound constraints without upper bounds, exact versions, or integrity hashes. Consequently, an installation performed after the audit may resolve to dependency versions that were not reviewed. The `npx ...@latest` instruction similarly executes a mutable release of an external package. The audited source imports `requests`, `schedule`, and `yaml`. No use of `beautifulsoup4`, `lxml`, or `python-dotenv` was found, so those packages unnecessarily expand the dependency and installation attack surface. No evidence was found that the currently named packages are typosquatted or malicious. The vulnerability is the unsafe dependency-resolution policy, not confirmed malicious behavior by any current dependency. ### Attack Path 1. An attacker compromises a dependency publisher account, package registry entry, distribution artifact, or a future release of the mutable `clawhub` installer. 2. The user follows the documented `npx ...@latest` or `pip install -r requirements.txt` command. 3. The package manager retrieves a version released after this Skill was reviewed. 4. Malicious package installation or import-time code executes with the privileges of the user running the installer or Skill. 5. That code ...[truncated 810 chars]- Remediation
View remediation
schedule== PyYAML== ``` 2. Generate a reproducible lock file and require package hashes, such as with `pip-compile --generate-hashes`. 3. Install with hash enforcement: ```bash pip install --require-hashes -r requirements.lock ``` 4. Remove `beautifulsoup4`, `lxml`, and `python-dotenv` unless they are required by code that is added and audited. 5. Replace `npx clawhub@latest` with a specific reviewed version. 6. Verify package provenance and integrity in CI, and use automated dependency vulnerability scanning. 7. Review and deliberately update pinned versions rather than allowing installations to resolve arbitrary future releases. ]]>
