T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:48
- Finding
- Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 48-55 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g mcporter ``` ### Technical Analysis The Skill instructs the agent to install `mcporter` globally from the configured npm registry without specifying a version or verifying package integrity. Consequently, the installed code depends on whichever package version and package contents the registry serves at execution time. A malicious or compromised future package release, registry account, registry mirror, or dependency in the package's transitive dependency tree could introduce arbitrary code. npm packages may also execute lifecycle scripts during installation. The global installation scope makes the package available beyond the current Skill invocation. This is an unsafe supply-chain practice even though the reviewed project does not itself contain a malicious script. ### Attack Path 1. An attacker compromises the `mcporter` package, one of its dependencies, its publisher account, or the npm registry path used by the system. 2. The attacker publishes or causes delivery of a malicious version. 3. A user invokes the Skill on a system where `mcporter` is absent. 4. The Skill asks for installation approval. 5. After approval, the agent runs `npm install -g mcporter` without a version or integrity constraint. 6. Malicious package code or an npm lifecycle script executes with the privileges of the user running npm. 7. The globally installed command remains available to later sessions and can affect subsequent MCP operations. ### Impact Assessment Successful exploitation permits package installation-time code to execute with the operating-system privileges of the invoking user. This may expose files, environment variables, OpenClaw configuration, and credentials accessible to that user. It may also alter globally installed tooling and affect fut ...[truncated 196 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `mcporter` to a specifically reviewed version, for example: ```bash npm install --global mcporter@<AUDITED_VERSION> ``` 2. Verify package provenance and integrity against a trusted lockfile, checksum, signature, or registry attestation. 3. Use a trusted, explicitly configured npm registry and disable unexpected registry overrides. 4. Prefer a project-local, isolated installation over a global installation. 5. Disable lifecycle scripts where they are unnecessary: ```bash npm install --ignore-scripts ... ``` 6. Review the pinned package and its transitive dependencies before approving updates. 7. Run installation and subsequent MCP operations using a dedicated, least-privileged account or sandbox. ]]>
