T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:6
- Finding
- Unpinned npm Dependency Installation Creates Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 6 **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"emoji":"📦","requires":{"bins":["mcporter"]},"install":[{"id":"node","kind":"node","package":"mcporter","bins":["mcporter"],"label":"Install mcporter (node)"}]}} ``` ### Technical Analysis The installation metadata identifies the npm package as `mcporter` without specifying an exact version or cryptographic integrity value. Consequently, the package manager may resolve and install whichever release is associated with the applicable npm distribution tag at installation time. This makes the reviewed skill definition non-reproducible: the dependency installed in the future may differ from the dependency available when the skill was audited. If the package, maintainer account, publication credentials, or package registry were compromised, a malicious release could be distributed without requiring any modification to this repository. The project contains only `SKILL.md` and `_meta.json`; no embedded executable scripts or direct malicious code were identified. There is also no evidence in the reviewed files that the current `mcporter` package is malicious. The finding concerns the unsafe dependency-resolution policy. ### Attack Path 1. An attacker compromises the `mcporter` npm package, a maintainer account, or the relevant registry publication process. 2. The attacker publishes a malicious version and causes it to be selected by the package's default or applicable distribution tag. 3. A user or agent installs this skill's required binary using the installation metadata. 4. Because no version is pinned, the installer resolves the attacker-controlled release. 5. Malicious package lifecycle scripts may execute during installation, or malicious behavior may run when the agent later invokes the installed `mcporter` binary. 6. The payload operates with ...[truncated 720 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `mcporter` to a reviewed, exact version rather than relying on an unversioned package reference. 2. Where supported by the skill installer, record and verify the package artifact's cryptographic integrity hash. 3. Use a lockfile or equivalent immutable dependency manifest for reproducible installation. 4. Review the selected package version, including its lifecycle scripts and transitive dependencies, before approving it. 5. Configure automated dependency monitoring, but require explicit review before updating the pinned version. 6. Run installation and CLI execution as an unprivileged user in a restricted environment with only the filesystem, credential, and network access necessary for the task. 7. Disable npm lifecycle scripts during installation when they are not required, then separately verify that the installed CLI functions correctly. ]]>
