T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned Third-Party npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 5 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium **Complete Code Snippet**: ```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 `mcporter` npm package only by name. It does not pin an audited version, provide an integrity hash, include a lockfile, or specify a verified package source. Consequently, installation can resolve to package content that differs from the content reviewed during this audit. This creates a software supply-chain risk. If the package publisher account or registry is compromised, or if a future package release becomes malicious, the installation process could retrieve attacker-controlled code. npm packages may also define lifecycle scripts that execute during installation with the permissions of the user performing the installation. The audit found no evidence that the current Skill intentionally selects a typosquatted package or contains a malicious payload. The vulnerability is the absence of controls that ensure installations remain tied to an audited artifact. ### Attack Path 1. An attacker compromises the upstream `mcporter` package, its publisher account, or the package distribution channel. 2. The attacker publishes a malicious release under the expected package name. 3. A user or agent installs the Skill dependency using the unversioned package declaration. 4. The package manager resolves and downloads the attacker-controlled release. 5. Malicious package code or npm lifecycle scripts execute in the installation environment. 6. The payload acts with the installing user's permissions and may compromise files, credentials, configuration, or subsequent CLI operations. ### Impact Assessment ...[truncated 589 chars]
- Remediation
- ## Remediation Suggestions - Pin `mcporter` to an exact, reviewed version rather than resolving an unspecified release. - Use a lockfile with registry-provided integrity metadata where the Skill packaging system supports it. - Document and enforce the canonical package registry and verified upstream publisher. - Validate the downloaded package against a trusted checksum or signed provenance before installation. - Review package contents and transitive dependencies whenever the pinned version is updated. - Disable npm lifecycle scripts during installation unless they are explicitly required and have been audited. - Perform installation and execution in a least-privilege, isolated environment with restricted access to credentials and sensitive files. - Consider generating and retaining a software bill of materials for the approved dependency version and its transitive dependency tree.
