T08 · Insecure Dependencies
- Location
package-lock.json:16- Finding
Dependencies Are Locked to a Third-Party npm Mirror
- Content
View full analysis
Vulnerability Details
File Location:
package-lock.json, lines 16, 25, 48, 60, 80, and 98
Vulnerability Type: Third-party dependency source and software supply-chain risk
Risk Level: LowVulnerable Code
json "resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz", "resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz", "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",Technical Analysis
The lockfile directs package installation to
registry.npmmirror.com, a third-party npm mirror, rather than the officialregistry.npmjs.orgservice. This expands the dependency trust boundary to include the mirror's infrastructure and operational security.The lockfile contains integrity hashes, which cause npm to reject downloaded archives that do not match the pinned hashes. This substantially limits exploitation through mirror compromise alone. Nevertheless, risk remains if an attacker can also modify the lockfile, introduce a malicious archive and corresponding integrity value, or otherwise compromise the dependency publication and lockfile-generation process.
The application directly imports
node-fetch, so malicious code introduced into that package or a transitive dependency could execute with the same operating-system privileges and environment access as the Skill process.Attack Path
- An attacker compromises the third-party mirror, the process used to generate the lockfile, or a contributor account capable of changing the lockfile.
- A malicious dependency archive is hosted at one of the locked URLs.
- Wher ...[truncated 1300 chars]
- Remediation
View remediation
Remediation Suggestions
- Configure npm to use the official registry:
bash npm config set registry https://registry.npmjs.org/ - Delete and regenerate the lockfile from a trusted environment:
bash rm -rf node_modules package-lock.json npm install - Review the regenerated dependency graph and verify that all
resolvedentries use an approved registry. - Commit the reviewed lockfile and use
npm ciin automated builds to prevent unreviewed dependency resolution. - Pin exact dependency versions where operationally appropriate and use automated vulnerability and integrity monitoring.
- If a mirror is organizationally required, use an authenticated, controlled internal proxy with upstream validation, audit logs, access controls, and artifact integrity enforcement.
- Configure npm to use the official registry:
