T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned npm Dependency Creates a Supply-Chain Execution Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 9-17 **Vulnerability Type**: Unpinned third-party npm dependency **Risk Level**: Medium ### Vulnerable Code ```yaml "requires": { "bins": ["mcporter"] }, "install": [ { "id": "mcporter", "kind": "node", "package": "mcporter", "bins": ["mcporter"], "label": "Install mcporter CLI (npm)", }, ], ``` ### Technical Analysis The skill declares `mcporter` as an npm dependency without specifying an exact, reviewed version or integrity hash. Consequently, installation may resolve to whichever package version is current in the configured npm registry at installation time. This makes the effective installed code mutable after the skill has been audited. If the upstream package, maintainer account, publication pipeline, or configured package registry is compromised, a malicious package release could be installed automatically. npm packages can execute code through lifecycle scripts during installation, and the resulting `mcporter` executable is subsequently trusted to configure and invoke the remote MCP service. The audit did not establish that the current `mcporter` package is malicious. The confirmed issue is the absence of dependency pinning and integrity verification, which exposes the installation process to avoidable supply-chain risk. ### Attack Path 1. An attacker compromises the `mcporter` npm package, its maintainer account, release pipeline, or the npm registry used by the environment. 2. The attacker publishes a malicious version under the legitimate package name. 3. A user installs this skill in an environment where `mcporter` is not already present. 4. The skill manager resolves the unversioned `"package": "mcporter"` declaration to the attacker-controlled release. 5. Malicious code executes through an npm lifecycle script or when the installed `mcporter` binary is invoked. 6. The payload acts wi ...[truncated 723 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `mcporter` to an exact, reviewed version rather than allowing installation of the latest release, for example: ```yaml "package": "mcporter@<reviewed-exact-version>" ``` 2. Where supported by the skill installation framework, verify the package archive using a cryptographic integrity hash or a committed lockfile. 3. Disable npm lifecycle scripts during installation when they are not required, such as by using `--ignore-scripts`. 4. Install and run the dependency as an unprivileged user in a sandbox or container with limited filesystem and network access. 5. Review the pinned package version, its transitive dependencies, lifecycle scripts, and published provenance before deployment. 6. Use a trusted internal registry or allowlist and automated dependency monitoring to detect unexpected ownership, provenance, or version changes. 7. Require an explicit review before upgrading the pinned dependency.
