T08 · Insecure Dependencies
- Location
clawhub 2/SKILL.md:19- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
clawhub 2/SKILL.md, lines 19–29
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumVulnerable Code:
yaml "package": "clawhub", "bins": ["clawhub"], "label": "Install ClawHub CLI (npm)",bash npm i -g clawhubTechnical Analysis
The skill instructs users to install the
clawhubnpm package globally without specifying an exact version or validating its integrity or provenance. Consequently, the installed artifact is whichever version the npm registry resolves at installation time, rather than a version that was fixed and audited alongside the skill.npm installations may execute package lifecycle scripts, such as
preinstall,install, andpostinstall. If the package or a transitive dependency is compromised, a malicious release could execute code during installation. The global installation option also places package files and executable shims into a shared tool location, increasing the installation's effect beyond the current project.This finding does not establish that the current
clawhubpackage is malicious. The vulnerability is the unsafe, mutable dependency-installation practice and the resulting supply-chain exposure.Attack Path
- An attacker compromises the npm publisher account, package distribution process, or a resolved dependency and publishes a malicious release.
- A user or agent follows the skill instruction and runs
npm i -g clawhub. - npm resolves and downloads the attacker-controlled release because no exact version or integrity value is specified.
- Malicious lifecycle scripts execute with the privileges of the account running npm.
- The package can modify files available to that account, access its environment and credentials, and install or replace globally exposed command shims.
- Subsequent invocations of the globally installed
clawhubexecutable may run attacker-controlled l ...[truncated 543 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the package to a reviewed exact version, for example:
bash npm install --global clawhub@<audited-exact-version> - Record and verify the expected package integrity digest and validate package provenance before installation.
- Prefer a project-local, lockfile-controlled installation rather than a global installation where practical.
- Review the pinned release, its transitive dependencies, and all npm lifecycle scripts before approval.
- Disable lifecycle scripts during installation with
--ignore-scriptswhen the package does not require them. - Run installation as an unprivileged account and do not use
sudoor an administrative shell. - Establish an update process in which new versions are reviewed and integrity-checked before changing the pinned version.
- Pin the package to a reviewed exact version, for example:
