T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Third-Party Dependencies Are Downloaded and Executed at Installation Time<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21–32 **Vulnerability Type**: Unpinned runtime dependency installation **Risk Level**: Medium ### Vulnerable Code ```yaml "requires": { "bins": ["python3", "pip3"] }, "install": [ { "id": "lark-plugin", "kind": "shell", "command": "npx -y @larksuite/openclaw-lark-tools install", "label": "Install official Lark/Feishu plugin", }, { "id": "pip-deps", "kind": "shell", "command": "pip3 install requests feedparser", "label": "Install Python dependencies (requests + feedparser)", }, ], ``` The related installation instructions in `SKILL.md`, line 51, also recommend retrying with elevated privileges: ```text 1. Execute the installation command: `npx -y @larksuite/openclaw-lark-tools install` (if installation fails, retry with `sudo`) ``` ### Technical Analysis The Skill downloads and executes npm and Python packages without pinning exact versions or validating package integrity. The `npx -y` command automatically accepts installation and executes whichever version the package registry resolves at installation time. Similarly, `pip3 install requests feedparser` installs the latest versions permitted by the active package index. Consequently, the code reviewed during this audit does not fully determine the code that will execute during installation. A compromised maintainer account, malicious upstream release, package-registry compromise, DNS or registry configuration manipulation, or dependency-resolution attack could cause arbitrary third-party code to execute. The recommendation to retry installation with `sudo` exceeds the minimum privileges normally necessary for a user-scoped Skill. If followed, package lifecycle scripts or installer code may execute with root privileges, substantially increasing the potential impact of a supply-chain compromise. ### Attack Path 1. An attacker compromises an upstream package, its mai ...[truncated 1423 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed, exact version. For example, use an exact npm version rather than an unqualified package name. 2. Commit and enforce an npm lockfile with integrity hashes where the Skill packaging model permits it. 3. Pin Python packages to exact versions and hashes in a requirements file, then install with a command such as: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Review and pin transitive dependencies, not only direct dependencies. 5. Install Python dependencies in a dedicated virtual environment rather than the global Python environment. 6. Remove the recommendation to use `sudo`. Provide user-scoped installation instructions and correct ownership or virtual-environment guidance instead. 7. Restrict dependency downloads to trusted registries and document the expected registry configuration. 8. Consider packaging reviewed dependencies or verifying signed release artifacts where supported. 9. Run plugin installation in a sandbox with limited filesystem, credential, and network access. ]]>
