T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party CLI Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-24` and `package.json:26-28` **Vulnerability Type**: Unpinned third-party dependency and unsafe global installation guidance **Risk Level**: Medium ### Vulnerable Code `SKILL.md:17-24`: ```bash npm install -g mcporter bun install -g mcporter ``` `package.json:26-28`: ```json "dependencies": { "mcporter": ">=0.7.0" } ``` ### Technical Analysis The skill instructs users to install the `mcporter` package globally without specifying an exact, reviewed version or verifying package integrity. The package manifest similarly permits any version equal to or newer than `0.7.0`. This configuration allows dependency resolution to select a future release that was not available during the audit. If the package publisher account, package registry, or upstream release process is compromised, a malicious accepted release could be installed. Depending on package-manager configuration, package lifecycle scripts may execute during installation. The installed CLI will also execute later with the permissions of the invoking user. Global installation increases exposure because the package becomes available across projects and sessions rather than remaining isolated to this skill. No lockfile, checksum, integrity value, or documented package provenance validation is present. ### Attack Path 1. An attacker compromises the upstream package, publisher account, or release pipeline for `mcporter`. 2. The attacker publishes a malicious version that satisfies the unrestricted `>=0.7.0` dependency range. 3. A user follows the skill instructions and runs `npm install -g mcporter`, or otherwise resolves dependencies from `package.json`. 4. The package manager downloads the compromised release. 5. Malicious lifecycle code may execute during installation, or malicious behavior executes when the globally installed CLI is invoked. 6. The payload operates with the invoking user's privileges and may access data available ...[truncated 921 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `mcporter` to an exact reviewed version in `package.json`, for example: ```json "dependencies": { "mcporter": "0.7.0" } ``` 2. Update the installation instructions to use the same exact version: ```bash npm install --global mcporter@0.7.0 ``` 3. Prefer a project-local installation over a global installation and invoke the local binary through the package manager. 4. Commit a lockfile containing resolved package versions and integrity hashes. 5. Verify the package name, publisher, registry source, release signatures, and checksums before recommending a new version. 6. Review dependency changes before upgrades rather than automatically accepting all future releases. 7. Where compatible with the package, disable lifecycle scripts during installation and enable only those explicitly reviewed and required. 8. Document the trusted registry and official upstream repository so users can detect typosquatted or substituted packages. ]]>
