T08 · Insecure Dependencies
- Location
skill.md:231- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 231-234
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Mediumbash ### 2. Install OpenClaw CLI ```bash npm install -g openclawtext ### Technical Analysis The setup instructions install the latest version of the `openclaw` package directly from the npm registry. They do not specify an exact reviewed version, use a lockfile, verify an integrity hash, or validate the package publisher and provenance. Because npm package contents are mutable across releases, the code installed by this command may differ from the code that existed when the Skill was audited. In addition, npm may execute package lifecycle scripts during installation. The global `-g` installation increases the potential scope because package files and executable shims are placed in system-wide or user-wide npm locations rather than being isolated within the project. This is a supply-chain weakness rather than evidence that the current `openclaw` package is malicious. Exploitation would require compromise, replacement, or publication of a malicious package version or one of its transitive dependencies. ### Attack Path 1. An attacker compromises the npm package, its publisher account, its publication pipeline, or a transitive dependency. 2. The attacker publishes a malicious or backdoored version that satisfies the unconstrained installation command. 3. A user follows the documented setup procedure and runs `npm install -g openclaw`. 4. npm retrieves the current package version and its dependency tree without comparison against a reviewed lockfile or expected integrity value. 5. Malicious lifecycle code may execute during installation, or a malicious globally installed executable may run when the user later invokes `openclaw`. 6. The payload operates with the permissions of the account that ran npm and may affect subsequent OpenClaw commands. # ...[truncated 682 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
openclawto an exact version that has been reviewed, rather than installing the latest release:bash npm install --save-exact openclaw@<reviewed-version> - Prefer a project-local dependency over a global installation and invoke it through a controlled project script or
npm exec. - Commit and enforce a lockfile so the complete transitive dependency graph and registry integrity values are reproducible.
- Use
npm ciin automated installation workflows and reject unexpected lockfile changes. - Verify package ownership, provenance, signatures or attestations, and integrity before recommending a version.
- Review package lifecycle scripts and use
--ignore-scriptswhere installation scripts are not required. - Run installation and the resulting CLI as an unprivileged, isolated account with only the filesystem and network permissions needed for the Skill.
- Document a controlled update process in which each new version and dependency change is reviewed before the pinned version is advanced.
- Pin
