T08 · Insecure Dependencies
- Location
package-lock.json:20- Finding
Dependencies Are Locked to a Third-Party npm Registry Mirror
- Content
View full analysis
Vulnerability Details
File Location:
package-lock.json:20-32
Vulnerability Type: Third-party dependency supply-chain exposure
Risk Level: MediumThe committed lockfile resolves packages through
registry.npmmirror.comrather than the official npm registry: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",The same third-party registry is used throughout the lockfile for direct and transitive dependencies. The installation instructions in
README.md:9-15andSKILL.md:82-88direct users to runnpm install, which processes these URLs.Technical Analysis
A package lock normally provides deterministic versions and cryptographic integrity hashes. The included SHA-512 integrity values substantially limit the ability of a compromised mirror to silently substitute package contents. Nevertheless, using a third-party mirror introduces an additional supply-chain trust boundary and exposes installation availability and package provenance to that operator.
Malicious package substitution would generally also require modification or bypass of the lockfile integrity metadata; compromise of the mirror alone should cause an integrity failure rather than silent execution. Risk remains if an attacker can alter both the mirror content and lockfile, influence installation so integrity checking is bypassed, or exploit weaknesses in mirror synchronization and package provenance.
Attack Path
- A user follow ...[truncated 1326 chars]
- Remediation
View remediation
Remediation Suggestions
- Configure npm to use the official registry:
bash npm config set registry https://registry.npmjs.org/ - Remove and regenerate the lockfile using the trusted registry:
bash rm -rf node_modules package-lock.json npm install - Verify that all resulting
resolvedfields usehttps://registry.npmjs.org/. - Commit the regenerated lockfile and use
npm ciin automated and production installations to enforce exact locked versions and integrity hashes. - Pin security-sensitive direct dependencies to reviewed versions rather than broad compatible ranges where operationally practical.
- Add dependency review and vulnerability scanning to the release process, including inspection for unexpected lifecycle scripts.
- If the mirror is intentionally required, document the trust decision, restrict it through organizational controls, and independently verify package hashes and provenance against the official npm registry.
- Configure npm to use the official registry:
