T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:42
- Finding
- Unpinned Third-Party Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 7, 42–46, and 68 **Vulnerability Type**: Supply-chain risk from mutable npm dependencies **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"🕺","requires":{"bins":["qhkit"]},"install":[{"kind":"node","package":"@iqinghu/qhkit","bins":["qhkit"]}]}} ``` ```bash npm i -g @iqinghu/qhkit ``` The instructions also permit execution through an unpinned `npx` invocation: ```bash npx @iqinghu/qhkit <command> ... ``` Updates explicitly install the mutable latest release: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill installs and immediately executes `@iqinghu/qhkit` without pinning it to a reviewed version or integrity value. Both an omitted version and the `@latest` tag are mutable references whose resolved contents may change after this Skill has been audited. npm package installation can execute package lifecycle scripts, while subsequent `qhkit` or `npx` calls execute code supplied by the package. The project contains no copy of that implementation, lockfile, or integrity metadata, so the package's effective behavior cannot be verified from the audited artifact. Global installation increases the affected scope by placing the executable in a shared user or system installation location. The fallback npm mirror introduces an additional distribution trust boundary. The instructions do not explicitly require elevated privileges, so root-level compromise cannot be assumed; execution normally receives the permissions of the user running the agent. ### Attack Path 1. An attacker compromises the package maintainer account, an npm distribution path, or the documented fallback registry. 2. The attacker publishes a malicious release under the existing package name or changes the version selected by the mutable `latest` reference. 3. The Skill follows its bootstrap or upgrade instructions and runs `npm i -g @iqinghu/qhkit`, `npx @iqing ...[truncated 934 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific, reviewed version rather than using an omitted version or `@latest`. 2. Record and verify package integrity using a lockfile and npm integrity metadata. 3. Avoid automatic global installation. Prefer a project-local, isolated installation with narrowly scoped filesystem permissions. 4. Do not automatically upgrade in response to remote CLI messages. Require explicit user approval and review the target version before installation. 5. Avoid `npx` behavior that can download missing packages implicitly. Use a previously installed and verified executable. 6. Where compatible, disable npm lifecycle scripts during installation with `--ignore-scripts`, then explicitly run only reviewed setup operations. 7. Restrict installation and execution in a sandbox that exposes only the required input images, output directory, network destinations, and credentials. 8. Treat the fallback mirror as a separate trust boundary and verify that retrieved package integrity matches trusted, independently obtained metadata. ]]>
