T08 · Insecure Dependencies
- Location
README.md:35- Finding
Unpinned npm Package Execution During Installation
- Content
View full analysis
Vulnerability Details
File Location:
README.md, line 35
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumComplete Code Snippet:
markdown 1. Install via ClawHub: `npx clawhub install zhenzhen-ehs-assistant`Technical Analysis
The documented installation command invokes the
clawhubnpm package throughnpxwithout specifying an exact version, integrity hash, signature, or authoritative package source. Depending on local npm behavior and cache state,npxmay retrieve the currently resolved package release and execute its CLI code with the privileges of the installing user.Consequently, the code executed at installation time can differ from the code originally reviewed. If the package publisher account, registry entry, package release, or a transitive dependency is compromised, malicious code could be introduced into the installation chain. The project itself contains no confirmed malicious scripts; this finding concerns the trust and reproducibility of its documented dependency-execution process.
Attack Path
- An attacker compromises the
clawhubnpm package, its publisher account, a transitive dependency, or the package-resolution channel. - The attacker publishes a malicious release or causes package resolution to return attacker-controlled code.
- A user follows the installation command in
README.md. npxdownloads or resolves the unpinned package and executes its CLI or applicable lifecycle code.- The malicious code runs under the installing user's account and can access resources available to that account.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the user running the installation command. Depending on that user's permissions and environment, the package could read or modify local files, access user-level credentials or tokens, alter development configuration, install pe ...[truncated 358 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the installer to a specifically reviewed package version, for example:
bash npx --yes clawhub@<reviewed-version> install zhenzhen-ehs-assistant - Confirm and document the official npm package name, publisher identity, registry, and source repository so users can detect typosquatting or package substitution.
- Publish package integrity information or signed release artifacts and provide verification instructions before execution.
- Review the pinned package and its transitive dependency tree for lifecycle scripts, known vulnerabilities, unexpected network behavior, and ownership changes.
- Where supported, disable unnecessary package lifecycle scripts and install with the least-privileged user account.
- Preserve the manual installation option and document how users can inspect downloaded files before placing them in the OpenClaw skills directory.
- Establish a controlled update process so version changes require review rather than automatically executing the latest available release.
- Pin the installer to a specifically reviewed package version, for example:
