T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:88
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:88-92` and `scripts/search.py:18-22` **Vulnerability Type**: Unpinned and unverified third-party dependency **Risk Level**: Medium ### Vulnerable Code `SKILL.md:88-92`: ```markdown If web_fetch is blocked, use Python's `ddgs` package: ```bash pip install ddgs ``` ``` `scripts/search.py:18-22`: ```python try: from ddgs import DDGS except ImportError: print("Error: ddgs not installed. Run: pip install ddgs", file=sys.stderr) sys.exit(1) ``` ### Technical Analysis The Skill instructs users to install `ddgs` from the default Python package index without specifying an exact version, verifying a cryptographic hash, or using a reviewed lock file. The bundled script repeats the same unpinned installation recommendation when the dependency is unavailable. Package installation may execute package-controlled build or installation logic. Consequently, the effective code installed by this instruction can change after the Skill has been reviewed. A compromised package release, compromised package-distribution account, or malicious replacement obtained through an unsafe package-index configuration could introduce arbitrary code. The legitimate web-search functionality requires a search provider or library, but it does not require accepting an unspecified future version of that dependency. The dependency behavior therefore exceeds the minimum safely defined trust boundary. ### Attack Path 1. An attacker compromises the `ddgs` distribution channel, maintainer account, or a package index configured in the user's environment. 2. The attacker publishes a malicious release or serves an attacker-controlled package under the expected name. 3. A user follows the documented fallback instruction or the error message and runs `pip install ddgs`. 4. Pip resolves the dependency without a version or hash constraint. 5. Package-controlled installation or runt ...[truncated 790 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `ddgs` to a specifically reviewed version instead of installing the latest available release: ```bash python -m pip install "ddgs==REVIEWED_VERSION" ``` 2. Record cryptographic hashes in a dependency file and require verification: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Generate and commit a lock file containing resolved transitive dependencies and hashes. 4. Configure installation to use an explicitly trusted package index and disable unintended extra indexes where feasible. 5. Install the dependency inside an isolated virtual environment without administrator privileges. 6. Review the pinned package and its transitive dependencies before updating the lock file. 7. Replace the unpinned installation command in both `SKILL.md` and the `scripts/search.py` error message with the secured installation procedure.
