T08 · Insecure Dependencies
- Location
frontend/package-lock.json:33- Finding
Third-Party npm Package Mirror Expands the Dependency Supply-Chain Trust Boundary
- Content
View full analysis
Vulnerability Details
File Location:
frontend/package-lock.json:33-34and numerous subsequentresolvedentries
Vulnerability Type: Third-party dependency source
Risk Level: MediumRepresentative code snippet:
json "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmmirror.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", "dev": true, "license": "MIT" }Technical Analysis
The lockfile directs npm to download this and numerous other dependency archives from
registry.npmmirror.comrather than the official npm registry. This creates an additional supply-chain trust boundary that is not necessary for the application's declared music-discovery functionality.SHA-512 integrity values allow npm to detect artifacts that differ from the lockfile's expected content. They substantially mitigate undetected archive replacement but do not eliminate risks associated with trusting an additional registry, including availability, registry governance, artifact provenance, and future lockfile updates generated against that source.
The integrity value is a standard package checksum. It is not sensitive information, does not encode user data, and is not evidence of a covert exfiltration or decode-and-execute mechanism. The static pre-scan warning concerning encoded sensitive output is therefore a false positive.
Attack Path
- A user follows the project instructions or executes
start.sh. npm installreadsfrontend/package-lock.json.- npm retrieves dependency archives from the specified third-party mirror.
- If the mirror, its delivery infrastructure, or dependency provenance is compromised—and an accepted artifact or lockfile is introduced—the package is installed locally.
- Any dependency lifecycle script permitted by npm could ...[truncated 689 chars]
- A user follows the project instructions or executes
- Remediation
View remediation
Remediation Suggestions
- Regenerate the lockfile using the official npm registry,
https://registry.npmjs.org/. - Enforce the approved registry through project and CI configuration.
- Use
npm ciin automated builds so installation strictly follows the reviewed lockfile. - Use
npm ci --ignore-scriptswhere dependency lifecycle scripts are not required. - Retain integrity hashes and review all lockfile changes.
- Pin security-sensitive production dependencies and run dependency auditing in CI.
- Use a controlled internal registry only when it provides documented provenance, access controls, monitoring, and artifact verification.
- Regenerate the lockfile using the official npm registry,
