T08 · Insecure Dependencies
- Location
package.json:10- Finding
Unnecessary npm dependencies expand the installation-time supply-chain attack surface
- Content
View full analysis
Vulnerability Details
File Location:
skill.md:36-39,package.json:10-17,package-lock.json:784-788,package-lock.json:981-985
Vulnerability Type: Unnecessary third-party dependencies and installation scripts
Risk Level: LowRelevant Code
skill.md:36-39instructs users to install the complete dependency graph:bash npm installpackage.json:10-17declares runtime packages that are not imported or used byquery.ts:json "dependencies": { "mcp-client": "^1.13.1", "zod": "^3.22.4" }, "devDependencies": { "@types/node": "^20.10.0", "tsx": "^4.6.0", "typescript": "^5.3.0" }The lockfile additionally marks the transitive
esbuildandfseventspackages as having installation scripts atpackage-lock.json:784-788andpackage-lock.json:981-985.Technical Analysis
The implemented CLI uses Node.js built-in modules and global
fetch; it does not importmcp-clientorzod. Requiring users to install these unused packages and their transitive dependency trees exceeds the minimum dependency set necessary for the declared REST API functionality.npm lifecycle and installation scripts execute with the privileges of the user running npm. Although the audited lockfile resolves packages from the official npm registry and no currently locked dependency was demonstrated to be malicious, every unnecessary dependency increases exposure to future package-account compromise, malicious updates, or compromised transitive packages. The presence of installation scripts makes this exposure more consequential because package code can run during installation, before the Skill itself is invoked.
This is a supply-chain hardening issue rather than evidence of active malicious behavior in the current package set.
Attack Path
- An attacker compromises an unnecessary direct or transitive npm package, or publishes a malicious version accepted by a future dependenc ...[truncated 1023 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
mcp-clientandzodunless they are required by functionality not present in the audited project. - Regenerate
package-lock.jsonafter removing unused packages to eliminate their transitive dependency trees. - Prefer
npm ciovernpm installfor reproducible installation from the reviewed lockfile. - Where operationally compatible, use
npm ci --ignore-scriptsand explicitly allow only installation scripts that are required. - Pin dependency versions, review lockfile changes, and run dependency auditing in CI.
- Avoid exposing unrelated secrets in the environment used for dependency installation.
- Remove or correct the
readandexplorepackage scripts because their referenced source files are absent, reducing configuration ambiguity.
- Remove
