T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned npm Packages Are Installed or Executed Without Integrity Verification
- Content
View full analysis
/ ``` ### Technical Analysis The documented commands install or execute npm packages without pinning an audited version, verifying an integrity hash, or using a lockfile. Consequently, the code that runs can differ over time even when users follow the same instructions. Both global npm installation and `npx` execution may run package code and npm lifecycle scripts. In particular, `npx clawdhub ...` can retrieve and immediately execute a package that is not already installed locally. If the package registry account, release process, or package itself is compromised, attacker-controlled code could run under the invoking user's account. The `clawdhub` package name should also be independently verified against the intended ClawHub publisher and official documentation. A branding or package-name mismatch can increase exposure to typosquatting or dependency-confusion attacks. ### Attack Path 1. An attacker compromises the referenced npm package, its publisher account, or its release pipeline; alternatively, a user is directed to an unintended similarly named package. 2. The attacker publishes a malicious package version or adds malicious lifecycle behavior. 3. A user follows the documented unpinned `npm install -g` or `npx` command. 4. npm retrieves the current package version from the registry without validating it against a project-controlled lockfile or expected digest. 5. Malicious lifecycle scripts or CLI code execute with the privileges of the invoking user. 6. The malicious package can access files and credentials available to that user, modify local configuration, or install attacker-controlled Agent Skills. ### Impact ...[truncated 537 chars]- Remediation
View remediation
