T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Global npm Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:4` and `SKILL.md:9-12` **Vulnerability Type**: Unpinned third-party dependency and unsafe global installation **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"requires":{"bins":["clawdhub"]},"install":[{"id":"node","kind":"node","package":"clawdhub","bins":["clawdhub"],"label":"Install ClawdHub CLI (npm)"}]}} ``` ```bash Install ```bash npm i -g clawdhub ``` ``` ### Technical Analysis The Skill declares and recommends installation of the `clawdhub` npm package without an exact version or integrity constraint. Consequently, npm resolves whichever package release is current when installation occurs rather than the specific release reviewed during this audit. npm installation can execute package lifecycle scripts, including `preinstall`, `install`, and `postinstall`. Because the command uses global installation, those scripts run with the permissions of the invoking user and can modify the applicable global npm installation area. The issue does not prove that the current package is malicious; it creates a mutable supply-chain execution path through which a compromised or malicious future package release could execute code without changes to this Skill. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or another component capable of modifying a future `clawdhub` release. 2. The attacker publishes a release containing malicious package content or lifecycle scripts. 3. A user follows the documented `npm i -g clawdhub` instruction after the malicious release becomes the version selected by npm. 4. npm downloads the attacker-controlled release and executes any enabled lifecycle scripts. 5. The scripts execute with the invoking user's privileges and can access files, credentials, environment variables, and network resources available to that user. 6. If installation is performed from an el ...[truncated 841 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version in both metadata and installation documentation, for example: ```bash npm install --global clawdhub@<reviewed-exact-version> ``` 2. Re-audit the package before changing the pinned version, including its bundled files, transitive dependencies, and lifecycle scripts. 3. Verify package provenance and integrity through trusted registry metadata, checksums, signatures, or npm provenance attestations where available. 4. Prefer a project-local installation with a committed lockfile instead of global installation when operationally feasible. 5. Install with lifecycle scripts disabled when the package does not require them: ```bash npm install --global --ignore-scripts clawdhub@<reviewed-exact-version> ``` 6. Perform installation as a non-administrative user and avoid `sudo` or privileged shells. 7. Restrict registry overrides such as `CLAWDHUB_REGISTRY` to explicitly trusted endpoints and document the approved registry.
