T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned and Unused Third-Party npm Dependencies Create Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, line 9 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable Code Snippet**: ```yaml metadata: {"clawdbot":{"emoji":"📱","requires":{"bins":["curl"]},"install":[{"kind":"npm","package":"threads-api"},{"kind":"npm","package":"@atproto/api"}]}} ``` ### Technical Analysis The installation metadata requests the `threads-api` and `@atproto/api` npm packages without exact version constraints or package integrity values. Consequently, installation can resolve to mutable package releases that were not part of this audit. npm dependencies may execute lifecycle scripts during installation. If either direct package, its maintainer account, or a transitive dependency is compromised, a malicious release could execute code in the installation environment. Such code would run with the privileges of the user or service installing the skill. No project file contains executable logic that uses either npm dependency. The demonstrated functionality consists of instructions for generating text, making this additional supply-chain exposure unnecessary based on the audited contents. This finding does not establish that the named packages are currently malicious; it identifies unsafe dependency resolution and an avoidable execution channel. ### Attack Path 1. An attacker compromises a package maintainer account, a transitive dependency, or the npm package distribution process. 2. The attacker publishes a malicious version containing an installation lifecycle script or compromised runtime logic. 3. A user installs the skill after that release becomes the version selected by npm. 4. Because no exact version or integrity-pinned lockfile is present, the installer retrieves the attacker-controlled release. 5. npm executes the malicious lifecycle script during installation, or the malicious code executes when the package is loaded. 6. The payload operates wit ...[truncated 697 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `threads-api` and `@atproto/api` from the installation metadata unless the skill has reviewed implementation code that directly requires them. 2. If the dependencies are necessary, pin each package to an exact, security-reviewed version rather than resolving a mutable latest release. 3. Add and commit a lockfile containing integrity hashes, and enforce reproducible installation with `npm ci`. 4. Review direct and transitive dependencies using npm audit tooling, package provenance information, maintainer history, and lifecycle-script inspection. 5. Disable npm lifecycle scripts during installation where compatible, for example by using `--ignore-scripts`. 6. Perform installation in a least-privileged sandbox without production credentials, sensitive environment variables, or write access to unrelated projects. 7. Document the functional reason for every dependency and periodically remove packages that are no longer used. 8. Remove the unused `curl` requirement as an additional least-capability hardening measure.
