T08 · Insecure Dependencies
Error
- Location
- SKILL.md:13
- Finding
- Unpinned Globally Installed npm Dependency## Vulnerability Details **File Location**: `SKILL.md:13-20` and `SKILL.md:51-53` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```yaml install: - id: node kind: node package: '@openclaw-cn/cli' bins: - claw label: Install OpenClaw CLI via npm ``` The update instructions similarly install the latest available package version: ```bash npm install -g @openclaw-cn/cli ``` ### Technical Analysis The Skill delegates all executable functionality to the external npm package `@openclaw-cn/cli`. Neither the installation metadata nor the update command pins an exact package version or supplies an integrity hash. Consequently, the code executed by the Skill can change after this project has been reviewed. A global npm installation may also execute package lifecycle scripts with the permissions of the installing user. The referenced source repository is not cryptographically bound to the package artifact installed from npm, so the documentation alone cannot establish that the published package corresponds to reviewed source code. This is a supply-chain weakness rather than evidence that the current dependency is malicious. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or registry distribution channel. 2. The attacker publishes a malicious version of `@openclaw-cn/cli`. 3. A user installs the Skill or follows the recommendation to update the CLI. 4. npm resolves the unpinned dependency to the attacker-controlled release. 5. Malicious lifecycle scripts or CLI code execute with the installing user's privileges. 6. The compromised CLI can access data available to that user and falsify any documented `claw` operation. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user performing the installation. The potential ...[truncated 509 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@openclaw-cn/cli` to a specific, reviewed version in installation metadata and update examples. 2. Record and verify the package integrity hash before installation. 3. Use npm provenance and signature verification where supported. 4. Publish reproducible build instructions so the registry artifact can be compared with the referenced source repository. 5. Avoid recommending automatic installation of the latest release without a separate review step. 6. Disable npm lifecycle scripts during installation where the package does not require them. 7. Prefer a project-local, least-privileged installation over a global or elevated installation. 8. Establish a controlled update process that reviews package diffs, ownership changes, dependencies, and lifecycle scripts before deployment.
