T08 · Insecure Dependencies
- Location
SKILL.md:48- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 48
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
bash npm i -g clawhubTechnical Analysis
The publishing instructions recommend installing the
clawhubnpm package globally without specifying a reviewed version or verifying package integrity. Because an unqualified npm installation resolves to the registry's current release, the effective code installed can change after this skill has been audited.npm packages may execute lifecycle scripts during installation. If the package, its maintainer account, or one of its transitive dependencies is compromised, following this instruction could execute attacker-controlled code with the privileges of the user running npm. The global installation option also places package files and executable links into global npm locations, increasing the duration and scope of exposure compared with an isolated, task-local dependency.
This issue is conditional on a supply-chain compromise or publication of a malicious package version. The project contains no evidence that the current
clawhubpackage is malicious, and the documented command is not executed automatically.Attack Path
- An attacker compromises the npm package, a maintainer account, or a transitive dependency, or otherwise causes a malicious release to become the version resolved by npm.
- A user follows the prerequisite in
SKILL.mdand runsnpm i -g clawhub. - npm downloads the mutable current release and its dependency tree without a project-controlled version or integrity lock.
- Malicious package contents or lifecycle scripts execute during installation.
- The installed global CLI can subsequently execute attacker-controlled behavior when the user performs authentication or publishing commands.
Impact Assessment
Exploitation could provide code execution ...[truncated 623 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed version, for example
npm install --global clawhub@<reviewed-version>. - Document the expected npm package name, publisher, registry, and reviewed version so users can detect dependency-confusion or package-ownership anomalies.
- Provide a published integrity hash or a verified provenance/signature workflow where the package ecosystem supports it.
- Prefer a project-local or isolated installation over a global installation when practical.
- Use a lockfile for reproducible dependency resolution if the CLI is incorporated into a managed project.
- Disable lifecycle scripts with
--ignore-scriptswhen they are not required, after confirming that doing so does not prevent legitimate installation. - Recommend installation under a non-privileged account and explicitly discourage running the command with
sudoor administrator privileges. - Periodically review the pinned package version and its transitive dependency tree before updating the documentation.
- Pin the CLI to a reviewed version, for example
