T08 · Insecure Dependencies
- Location
README.md:49- Finding
Unpinned Global npm Installer Creates a Supply-Chain Execution Risk
- Content
View full analysis
Vulnerability Details
File Location:
README.md:49andREADME.md:61
Vulnerability Type: Unpinned third-party dependency installed globally from mutable registries
Risk Level: MediumRelevant code snippets:
bash # Install npm install -g clawhubbash npm install -g clawhub --registry=https://registry.npmmirror.comThe same unpinned installation approach is repeated in the troubleshooting instructions at
README.md:381-384and mirrored inREADME.zh.md.Technical Analysis
The documented installation procedure directs users to globally install the latest available release of the
clawhubnpm package without specifying an exact version or verifying an integrity digest. The optional use ofhttps://registry.npmmirror.comintroduces an additional package-distribution trust boundary.npm packages can execute lifecycle scripts during installation. Consequently, the effective code executed by this command can change after the Skill has been reviewed, even when the audited project itself remains unchanged. A compromised maintainer account, malicious package update, registry compromise, or dependency-chain compromise could cause attacker-controlled code to execute during installation.
This finding concerns the installation documentation and supply-chain model. The audit did not establish that the current
clawhubpackage or the mirror is malicious. The runtime implementation intoken-stats.pydoes not itself download remote payloads, import networking libraries, or invoke subprocesses.Attack Path
- An attacker compromises the
clawhubnpm package, one of its transitive dependencies, its publisher account, or a configured registry. - The attacker publishes or serves a malicious package version containing an npm lifecycle script or modified executable.
- A user follows the project documentation and runs
npm install -g clawhubwithout an exact version or integrity constr ...[truncated 1134 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin the installer to a reviewed exact version, for example:
bash npm install -g clawhub@<reviewed-exact-version> --ignore-scriptsUse
--ignore-scriptsonly after confirming that the package does not legitimately require lifecycle scripts. -
Publish the expected package name, exact version, source repository, and integrity digest in the installation documentation.
-
Prefer the official npm registry. If a mirror must be supported, clearly identify it as an additional trust boundary and provide a procedure for comparing package integrity against the official registry.
-
Avoid global installation where practical. Use a project-local, version-locked dependency or distribute a verified standalone installer.
-
Pin and audit transitive dependencies through an appropriate lockfile in the installer project.
-
Update all duplicated installation and troubleshooting commands in
README.mdandREADME.zh.mdso users are not directed back to the unpinned command. -
Warn users not to run npm installation with
sudoor administrator privileges unless explicitly required and independently reviewed.
-
