T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party npm Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 4 **Vulnerability Type**: Unpinned and globally installed third-party dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```yaml metadata: {"clawdbot":{"emoji":"🎮","requires":{"bins":["doki"]},"install":[{"id":"npm","kind":"npm","package":"@tryjoy/dokidoki","global":true,"bins":["doki"],"label":"Install dokidoki (npm)"}],"label":"dokidoki"}} ``` ### Technical Analysis The skill installs `@tryjoy/dokidoki` from npm with `"global": true`, but does not specify an exact package version, integrity hash, lockfile, or other verification mechanism. Consequently, npm may resolve a mutable package release that was not the version reviewed when the skill was authored. npm packages can contain lifecycle scripts and executable code that run during installation or subsequent CLI invocation. A global installation also places the package and its executable into the user's global Node.js environment rather than isolating it within the project. The source and behavior of the dependency are not included in the audited artifact, so they cannot be verified from this project. There is no evidence in the reviewed file that `@tryjoy/dokidoki` is currently malicious. The vulnerability is the unsafe dependency acquisition and installation model, which creates a supply-chain attack opportunity if the package, publisher account, or distribution channel is compromised. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another component of the dependency supply chain. 2. The attacker publishes a malicious or backdoored version of `@tryjoy/dokidoki`. 3. A user installs the skill when that version is the package version resolved by npm because no exact version is pinned. 4. npm downloads and globally installs the attacker-controlled package. 5. Malicious lifecycle code may execute during installation, or malicious runtime code may execute when the user in ...[truncated 769 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@tryjoy/dokidoki` to an exact, reviewed version rather than allowing npm to resolve an unspecified release. 2. Record and verify the package integrity hash using a trusted lockfile or an equivalent integrity-verification mechanism. 3. Review the package source, transitive dependencies, and npm lifecycle scripts for the exact pinned release. 4. Avoid global installation where possible. Install the dependency in a project-local or otherwise isolated environment with restricted permissions. 5. Disable npm lifecycle scripts during installation when they are not required, for example by using an appropriate `ignore-scripts` policy. 6. Run the CLI under a dedicated, least-privileged account or sandbox with only the Bluetooth, filesystem, and network permissions required for its documented operation. 7. Establish a controlled dependency-update process in which new versions are reviewed and tested before the pin and integrity metadata are changed. ]]>
