T08 · Insecure Dependencies
- Location
package-lock.json:18- Finding
Dependencies Are Locked to a Third-Party npm Mirror
- Content
View full analysis
Vulnerability Details
File Location:
package-lock.json:18-31; related registry configuration in开发记录.md:29-30; automatic installation path instart.sh:18-21
Vulnerability Type: Supply-chain exposure through a non-default dependency source
Risk Level: MediumVulnerable Code
package-lock.json:18-31:json "node_modules/@hono/node-server": { "version": "1.19.11", "resolved": "https://registry.npmmirror.com/@hono/node-server/-/node-server-1.19.11.tgz", "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==", "license": "MIT", "engines": { "node": ">=18.14.1" }, "peerDependencies": { "hono": "^4" } }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.27.1", "resolved": "https://registry.npmmirror.com/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz", "integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==",开发记录.md:29-30:bash npm config set registry https://registry.npmmirror.com npm install @modelcontextprotocol/sdk zodThe same third-party host is used for the remaining dependency archive URLs throughout
package-lock.json.Technical Analysis
The lockfile directs npm to retrieve dependency archives from
registry.npmmirror.comrather than the official npm registry. The development documentation also recommends changing npm's persistent registry configuration to that mirror. This expands the installation trust boundary beyond the package authors and official npm infrastructure.The project startup wrapper invokes
npm installwhennode_modulesis absent. Consequently, first-time startup may initiate network retrieval of the locked packages without a separate dependency-review step.SHA-512 integrity values are present, which materially reduce substitution risk: npm should reject an archive whose conten ...[truncated 2468 chars]
- Remediation
View remediation
Remediation Suggestions
-
Regenerate
package-lock.jsonusing the official npm registry:bash npm config set registry https://registry.npmjs.org/ rm -rf node_modules package-lock.json npm install -
Review the regenerated dependency tree and commit the new lockfile only after verifying that every
resolvedpackage URL uses the intended official registry. -
Remove the recommendation to persistently change the user's npm registry from
开发记录.md. If a mirror must be offered for regional availability, document it as an explicit optional choice with its trust implications. -
Use deterministic installation in automation and startup workflows:
bash npm ci --ignore-scriptsConfirm compatibility before disabling lifecycle scripts.
-
Avoid silently installing dependencies as part of server startup. Separate installation from execution so users can review the network operation before launching the Skill.
-
Pin direct dependencies to exact reviewed versions rather than caret ranges:
json { "dependencies": { "@modelcontextprotocol/sdk": "1.27.1", "zod": "4.3.6" } } -
Enable automated dependency vulnerability and provenance checks, and require review for any lockfile or registry-source change.
-
