T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned Third-Party Node.js Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 5 **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 requests the `mcporter` Node.js registry package without specifying an exact version or package integrity hash. Consequently, the package content installed in the future may differ from the content reviewed when this Skill was published. This creates a supply-chain risk because package resolution depends on mutable external registry state. If the package publisher account, registry entry, or transitive dependency chain is compromised, a malicious release could be selected during installation. Node.js packages may execute lifecycle scripts during installation, allowing compromised package content to run commands on the host. ### Attack Path 1. An attacker compromises the `mcporter` package publisher, its registry account, or a dependency in its supply chain. 2. The attacker publishes a malicious version that contains harmful runtime behavior or an installation lifecycle script. 3. A user installs the Skill dependency using the unversioned package declaration. 4. The package manager resolves the attacker-controlled release because no exact reviewed version or integrity constraint is enforced. 5. Malicious package code executes during installation or when the `mcporter` command is invoked. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the account performing the installation or running `mcporter`. Depending on those privileges, the attacker could access local files and credentials available to that account, alter project or user configuration, invoke network ...[truncated 170 chars]
- Remediation
- ## Remediation Suggestions - Pin `mcporter` to an exact, reviewed version rather than allowing unconstrained registry resolution. - Enforce package integrity verification using a trusted lockfile or a cryptographic integrity hash. - Obtain the package only from an explicitly trusted registry and protect registry configuration from dependency-confusion attacks. - Review direct and transitive dependencies before updating the pinned version. - Disable package lifecycle scripts during installation where operationally feasible, or perform installation in an isolated environment. - Run the installed CLI with least privilege and restrict its filesystem, credential, and network access. - Establish a controlled update process in which new versions are reviewed and tested before the version pin and integrity data are changed.
