T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:6
- Finding
- Unpinned Third-Party CLI Installation and Automatic Upgrade## Vulnerability Details **File Location**: `SKILL.md:6`, `SKILL.md:43-47`, and `SKILL.md:62-66` **Vulnerability Type**: Unpinned executable dependency and unsafe automatic upgrade **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 ``` ```bash npm i -g @iqinghu/qhkit@latest ``` The surrounding instructions also permit installation through an alternative npm mirror and execution through an unpinned `npx @iqinghu/qhkit` command. ### Technical Analysis The Skill installs an executable npm package without pinning it to a specific reviewed version or integrity digest. It also directs the Agent to install `@latest` when an upgrade signal is observed. Consequently, the code executed during future Skill invocations is not necessarily the code that existed when the Skill was audited. npm packages may execute code through lifecycle scripts during installation and through the installed CLI when invoked. A malicious or compromised release could therefore run arbitrary commands under the identity of the Agent process. The global installation scope is broader than necessary for a single Skill and can affect other sessions that use the same environment. The permitted mirror fallback increases the number of supply-chain services that must remain trustworthy. If both a package and its metadata are obtained from the same compromised source, normal package-manager checks do not establish that the package matches a separately reviewed release. The Node bootstrap checksum pipeline at `SKILL.md:52-53` is not a `curl | bash` execution pipeline: the remote checksum text is filtered and passed to `sha256sum`, not to a shell. However, the mirror fallback obtains both the archive and checksum from the same mirror, so compromise of that mirror could replace both artifac ...[truncated 1404 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to an exact, reviewed version in both metadata and installation commands. 2. Record and verify package integrity using a lockfile or trusted SHA-512 integrity value. 3. Replace automatic `@latest` upgrades with an explicit user-approved update procedure. 4. Prefer a project-local installation over `npm i -g` and invoke the pinned local binary. 5. Disable npm lifecycle scripts with `--ignore-scripts` where the package can function without them. 6. If lifecycle scripts are required, document and review them before installation. 7. Avoid changing registries automatically. If a mirror is necessary, require explicit user approval and verify artifacts against integrity metadata obtained from an independent trusted source. 8. Run the CLI in a restricted environment with access only to the files and credentials required for image generation.
