T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:6
- Finding
- Mutable Third-Party CLI Is Installed and Executed Without Version or Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6 and 40–63 **Vulnerability Type**: Supply-chain exposure through unpinned npm installation **Risk Level**: Medium ### Relevant Code Snippet ```yaml metadata: {"openclaw":{"emoji":"🪄","requires":{"bins":["qhkit"]},"install":[{"kind":"node","package":"@iqinghu/qhkit","bins":["qhkit"]}]}} ``` ```bash npm i -g @iqinghu/qhkit ``` The instructions also allow direct execution through `npx`: ```bash npx @iqinghu/qhkit <command> ... ``` The upgrade procedure explicitly retrieves the latest available release: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill installs and executes the external `@iqinghu/qhkit` npm package without pinning an audited version or verifying package integrity. The `@latest` upgrade command intentionally resolves to a mutable release that may change after this Skill has been reviewed. The `npx` fallback can also download and immediately execute the package when it is not already available locally. Depending on npm configuration, package lifecycle scripts and the installed CLI execute with the permissions of the user running the Agent. The instructions additionally permit use of `registry.npmmirror.com` as a fallback registry. Although described as a mirror, this introduces another supply-chain trust boundary. No package digest, lockfile, signature, provenance attestation, or approved-version allowlist is required. The dependency appears necessary for the declared image-generation functionality, but global installation, mutable version selection, and immediate execution exceed the minimum-risk installation approach. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, a newly published release, or a configured registry response. 2. The attacker publishes malicious package code under the expected package name or compromises the release selected by the mutable version constraint. 3. The Agent follows the Skil ...[truncated 1066 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specifically reviewed version rather than using an unqualified package name or `@latest`. 2. Record and verify the package integrity digest, such as the npm `dist.integrity` value, before execution. 3. Remove the instruction to execute the package directly through an unpinned `npx` invocation. 4. Prefer a project-local installation controlled by a lockfile instead of a global installation. 5. Disable npm lifecycle scripts with `--ignore-scripts` when compatible with the package. 6. Use only explicitly approved registries and validate that fallback mirrors provide the expected integrity metadata. 7. Run the CLI in a restricted environment with access only to required input files, output locations, network destinations, and credentials. 8. Do not install with administrator or root privileges. If the package cannot be installed without elevation, stop and request a safer pre-provisioned environment. 9. Review and approve each new package version before updating the pinned version. ]]>
