T08 · Insecure Dependencies
Warning
- Location
- package-lock.json:20
- Finding
- Dependencies Are Locked to a Third-Party npm Registry Mirror## Vulnerability Details **File Location**: `package-lock.json:20-32` **Vulnerability Type**: Third-party dependency supply-chain exposure **Risk Level**: Medium The committed lockfile resolves packages through `registry.npmmirror.com` rather 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-15` and `SKILL.md:82-88` direct users to run `npm 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 1. A user follow ...[truncated 1326 chars]
- Remediation
- ## Remediation Suggestions 1. Configure npm to use the official registry: ```bash npm config set registry https://registry.npmjs.org/ ``` 2. Remove and regenerate the lockfile using the trusted registry: ```bash rm -rf node_modules package-lock.json npm install ``` 3. Verify that all resulting `resolved` fields use `https://registry.npmjs.org/`. 4. Commit the regenerated lockfile and use `npm ci` in automated and production installations to enforce exact locked versions and integrity hashes. 5. Pin security-sensitive direct dependencies to reviewed versions rather than broad compatible ranges where operationally practical. 6. Add dependency review and vulnerability scanning to the release process, including inspection for unexpected lifecycle scripts. 7. 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.
