T08 · Insecure Dependencies
Warning
- Location
- SUBMISSIONS.md:15
- Finding
- Unpinned Global npm CLI Installation Creates a Supply-Chain Execution Risk## Vulnerability Details **File Location**: `SUBMISSIONS.md:15` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable code snippet:** ```markdown - **Requirements:** GitHub account (1+ week old), `npm install -g clawdhub`, `clawdhub login` ``` ### Technical Analysis The publishing instructions direct maintainers to install the `clawdhub` npm package globally without pinning a version or recording an integrity value. npm installation can execute package lifecycle scripts, including `preinstall`, `install`, and `postinstall`, under the privileges of the user running the command. The package name also differs from the referenced “ClawHub” product spelling. This does not prove that the package is malicious, but it increases the importance of explicitly verifying and documenting the canonical package identity. Without version pinning, future installations resolve to whichever release the registry currently designates, so a compromised maintainer account or malicious future release could change the effective executable after this Skill has been audited. Global installation unnecessarily broadens the package's influence over the local user environment and may place executable files in a shared command path. The Skill itself does not automatically run this command; exploitation requires a maintainer to follow the documented publishing workflow. ### Attack Path 1. An attacker publishes or gains control of the npm package or one of its transitive dependencies. 2. The attacker adds a malicious lifecycle script or executable to a release selected by npm. 3. A maintainer follows `SUBMISSIONS.md` and runs `npm install -g clawdhub`. 4. npm downloads the uncontrolled release and may execute its lifecycle scripts during installation. 5. Malicious code runs with the maintainer's current user privileges and can access resources available to that account. 6. The malicious CLI could subsequently capture cr ...[truncated 776 chars]
- Remediation
- ## Remediation Suggestions 1. Verify the official npm package name through an independently authenticated ClawHub source and document the canonical package scope and publisher. 2. Pin an audited, exact package version rather than installing the registry's current release: ```bash npm install --save-dev --save-exact <verified-package>@<audited-version> ``` 3. Prefer a project-local development dependency and invoke it through a locked package script instead of modifying the user's global command path. 4. Commit a lockfile and verify its integrity metadata during installation. 5. Review the selected package, its lifecycle scripts, and its transitive dependencies before adoption. 6. Where compatible with the verified package, disable lifecycle scripts during installation: ```bash npm ci --ignore-scripts ``` 7. Execute publishing tooling in an isolated, least-privileged environment with narrowly scoped credentials. 8. Pin CI dependencies by immutable digest or verified release artifact and enable dependency monitoring for ownership changes or compromised releases.
