T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Unpinned npm Dependency Allows Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 8–16 **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 version, package integrity hash, or lockfile. Consequently, installation can resolve to whichever package version is available under that name at installation time. npm packages may execute lifecycle scripts during installation. If the package registry account, package release process, or a transitive dependency is compromised, a malicious future release could execute arbitrary code before the installed command is used. Because the effective dependency contents may change after this skill has been reviewed, the audited skill does not provide a reproducible or integrity-verified installation. The package name is explicit and no evidence of intentional dependency confusion or typosquatting was found. The risk arises from unsafe dependency resolution rather than confirmed malicious package contents. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, the release pipeline, or an included transitive dependency. 2. The attacker publishes a malicious release under the dependency name resolved by the skill. 3. A user installs or activates the skill on a system where `mcporter` is not already available. 4. The installation mechanism retrieves the latest compatible package because no exact version or integrity value is specified. 5. Malicious npm lifecycle code executes during installation, or malicious behavior executes when the skill invokes `mcporter`. 6. The payload operates with t ...[truncated 722 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `mcporter` to a specific, reviewed version rather than resolving an unrestricted current release. 2. Use a committed lockfile containing registry-resolved integrity hashes to make installation reproducible. 3. Verify the package provenance, publisher identity, release signatures, and integrity before installation. 4. Install with npm lifecycle scripts disabled where compatible, and explicitly review any scripts that must run. 5. Run the dependency with least privilege in a sandbox or restricted service account, limiting filesystem, credential, and network access. 6. Maintain an approved-version policy and repeat the security review before updating the pinned version. 7. Document the expected registry and package source to reduce dependency-confusion and registry-substitution risks.
