T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned Executable npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 5 **Vulnerability Type**: Unpinned third-party executable dependency **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 `mcporter` without specifying an immutable version, package integrity hash, or other verifiable artifact reference. Consequently, installation can resolve a mutable package release that was not necessarily the version reviewed when this Skill was audited. npm packages can execute code through lifecycle scripts during installation, and the installed `mcporter` binary subsequently executes with the privileges of the invoking user. If the package, publisher account, registry resolution process, or a future release is compromised, malicious code could run during installation or when the CLI is invoked. The audited file does not itself contain a malicious payload, and there is no evidence that the current package release is malicious. The vulnerability is the absence of dependency pinning and integrity verification at this executable supply-chain boundary. ### Attack Path 1. An attacker compromises the npm package publisher account, registry resolution path, or another mechanism controlling the release resolved by the unversioned `mcporter` package reference. 2. The attacker publishes or serves a malicious release under the expected package name. 3. A user or agent installs the Skill dependency from the mutable package reference. 4. The package manager resolves the attacker-controlled release because no reviewed version or integrity hash is enforced. 5. Malicious code executes through an npm lifecycle script or when the installed `mcporter` binary is invoked. 6. The code operates with ...[truncated 764 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `mcporter` to a specific version that has been reviewed and tested rather than resolving the latest available release. 2. Enforce package integrity using an npm lockfile with integrity metadata or an equivalent immutable artifact digest. 3. Verify package provenance, publisher identity, and registry source before installation. 4. Prefer reproducible installation mechanisms such as `npm ci` against a committed lockfile. 5. Disable npm lifecycle scripts during installation where operationally feasible, then explicitly enable only required and reviewed installation behavior. 6. Run the CLI under a least-privileged account or sandbox, exposing only the configuration, credentials, files, and network destinations required for the requested operation. 7. Establish a controlled dependency-update process that reviews release changes and refreshes the pinned version and integrity data only after validation.
