T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:156
- Finding
- Unpinned npm Package Execution Through Mutable Latest Version## Vulnerability Details **File Locations**: - `SKILL.md:156-160` - `README.md:12-16` - `README.md:41-45` - `README_CN.md:13-17` - `README_CN.md:41-45` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium **Vulnerable Code Snippets**: `SKILL.md:156-160`: ```bash ## Installation ```bash npx clawhub@latest install memory-distiller ``` ``` `README.md:12-16`: ```bash ## Installation ```bash npx clawhub@latest install memory-distiller ``` ``` `README.md:41-45`: ```bash Install both for maximum effect: ```bash npx clawhub@latest install proactive-agent npx clawhub@latest install memory-distiller ``` ``` `README_CN.md:13-17`: ```bash ```bash npx clawhub@latest install memory-distiller ``` ``` `README_CN.md:41-45`: ```bash ```bash npx clawhub@latest install proactive-agent npx clawhub@latest install memory-distiller ``` ``` ### Technical Analysis The documented installation procedure invokes `npx` with the mutable `@latest` version selector. `npx` can download and execute npm packages, including package lifecycle or command-entry scripts, with the permissions of the user running the command. Because `@latest` is not tied to an exact reviewed package version or integrity digest, the effective code executed during installation can change after this Skill has been audited. Neither the downloaded `clawhub` package nor the optional `proactive-agent` package is included in the reviewed project, so their implementation and future releases cannot be verified from the audited files. This creates a supply-chain exposure: compromise of the package publisher, npm account, registry resolution process, or a future release could cause users following the documentation to execute altered code. ### Attack Path 1. An attacker compromises the npm publisher account, publication pipeline, or another component controlling the package selected by the `latest` ...[truncated 1116 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version, for example: ```bash npx clawhub@1.2.3 install memory-distiller ``` 2. Review the selected package release and its transitive dependencies before recommending it. 3. Pin dependency integrity using a lockfile, cryptographic digest, trusted artifact mechanism, or registry integrity verification where supported. 4. Document the expected npm registry and avoid allowing untrusted registry overrides during installation. 5. Apply the same version-pinning and verification controls to the optional `proactive-agent` installation. 6. Consider instructing users to download and inspect the package before execution rather than combining retrieval and execution in one command. 7. Run installation with the least-privileged account necessary and without unnecessary credentials in the environment.
