T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:11
- Finding
- Unpinned and Unnecessary Third-Party Dependencies Create Supply-Chain Risk< (Windows, MacOS) and run `pip install duckduckgo-search` **Installation Best Practices:** - If you encounter permission errors, use a virtual environment instead of system-wide installation - For virtual environment: `python -m venv venv && source venv/bin/activate && pip install duckduckgo-search` ``` The script documents and imports the dependency without enforcing a reviewed version: ```python Requires: pip install duckduckgo-search ``` ```python from duckduckgo_search import DDGS ``` ### Technical Analysis The installation instructions retrieve the current version of `duckduckgo-search` from the default Python package index without specifying an exact version, package hash, lockfile, or integrity-verification procedure. Consequently, the code reviewed during this audit does not define the exact dependency code that will later execute. The documentation also requires users to install OpenClawCLI from an external website, but `scripts/search.py` does not import, invoke, or otherwise use that CLI. This unnecessary prerequisite expands the supply-chain and installation attack surface beyond what is required to provide DuckDuckGo search functionality. There is no evidence in the audited project that either external dependency is currently malicious. The vulnerability is the mutable and insufficiently verified dependency acquisition process, combined with installation of an apparently unused external component. ### Attack Path 1. A user follows the prerequisite instructions in `SKILL.md`. 2. The user installs the unconstrained latest release of `duckduckgo-search` from the configured Python package repository and may sepa ...[truncated 1248 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the OpenClawCLI prerequisite unless the implementation genuinely requires it. If it is required by an external runtime, clearly document the specific purpose and trusted installation mechanism. 2. Pin `duckduckgo-search` to a reviewed, exact version rather than installing an unconstrained latest release, for example through a version-locked requirements file. 3. Generate and verify cryptographic hashes for all resolved distributions, such as by using a hash-locked requirements file and `pip install --require-hashes`. 4. Commit a reproducible dependency lockfile that includes transitive dependencies, and update it only through a documented review process. 5. Install dependencies exclusively inside a dedicated virtual environment with ordinary user privileges. 6. Avoid invoking package installation with administrator or root privileges. 7. Add automated dependency vulnerability and provenance checks to the release process. 8. Periodically review dependency updates before changing the pinned version, including package ownership, release history, source repository, and integrity metadata. ]]>
