T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:75
- Finding
- Unpinned npm Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6, 75-80, and 100-104 **Vulnerability Type**: Unsafe third-party dependency installation **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 documented fallback executes the package 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 `@iqinghu/qhkit` without pinning an exact reviewed version or enforcing a package integrity value. The `@latest` upgrade procedure intentionally resolves to mutable package contents, meaning the executable code used by the Skill can change after this Skill has been audited. Both global npm installation and `npx` may execute package lifecycle scripts and package binaries with the privileges of the invoking user. The optional use of another npm registry also expands the number of infrastructure components that must be trusted. The package is relevant to the declared workflow, so requiring a CLI dependency is not inherently excessive. However, globally installing an unpinned executable package exceeds the minimum-risk approach because a project-local, exact-version installation would provide the required functionality with less system-wide exposure. ### Attack Path A feasible supply-chain exploitation path is: 1. An attacker compromises the npm publisher account, a dependency, a registry response, or a future package release. 2. The compromised release is assigned the version selected by the unpinned installation or the `latest` tag. 3. The user or agent follows the Skill instructions and runs the global npm installation, upgrade command, or `npx` fallback. 4. npm downloads the compromised packag ...[truncated 1150 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to an exact reviewed version rather than using an unconstrained package name or `@latest`. 2. Record and verify package integrity using a lockfile or an expected npm integrity hash. 3. Prefer a project-local or isolated installation over global installation. 4. Avoid `npx` with an unpinned package because it can download and immediately execute a release that was not reviewed. 5. Require explicit user approval before installing or upgrading executable dependencies. 6. Remove automatic upgrade guidance based only on stderr notifications. Review and pin each new release before deployment. 7. Where compatible, install with lifecycle scripts disabled and explicitly enable only scripts demonstrated to be required. 8. Document the exact trusted registry and avoid silently switching registries. If a mirror is necessary, apply the same integrity verification as for the primary registry. 9. Run the CLI under an account with access only to the media required for the current workflow and store API tokens with restrictive file permissions. ]]>
