T08 · Insecure Dependencies
Warning
- Location
- package-lock.json:21
- Finding
- Dependencies Are Locked to a Non-Official Package Registry## Vulnerability Details **File Location**: `package-lock.json:21-65` **Additional Trigger Locations**: `SKILL.md:68-76`, `setup.json:15-18` **Vulnerability Type**: Supply-chain exposure through a third-party package registry **Risk Level**: Medium ### Vulnerable Code ```json "node_modules/csv-parser": { "version": "3.2.0", "resolved": "https://registry.npmmirror.com/csv-parser/-/csv-parser-3.2.0.tgz", "integrity": "sha512-fgKbp+AJbn1h2dcAHKIdKNSSjfp43BZZykXsCjzALjKy80VXQNHPFJ6T9Afwdzoj24aMkq8GwDS7KGcDPpejrA==", "license": "MIT", "bin": { "csv-parser": "bin/csv-parser" }, "engines": { "node": ">= 10" } }, "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ "darwin" ] } ``` ```json "node_modules/playwright": { "version": "1.58.2", "resolved": "https://registry.npmmirror.com/playwright/-/playwright-1.58.2.tgz", "integrity": "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==" }, "node_modules/playwright-core": { "version": "1.58.2", "resolved": "https://registry.npmmirror.com/playwright-core/-/playwright-core-1.58.2.tgz", "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==" } ``` The project documentation directs users to run `npm install`, causing npm to retrieve the locked artifacts from `registry.npmmirror.com` rather than the official npm registry. ### Technical Analysis A lockfile normally improves reproducibility, but it also determines the source from which package archives are retrieved. This lockfile places the availability and delivery of every runtime d ...[truncated 1963 chars]
- Remediation
- ## Remediation Suggestions 1. Configure npm to use the official registry: ```bash npm config set registry https://registry.npmjs.org/ ``` 2. Delete and regenerate `package-lock.json` from the official registry after independently verifying dependency versions. 3. Use `npm ci` in controlled environments so the reviewed lockfile is installed without dependency-resolution drift. 4. Pin exact dependency versions in `package.json` rather than broad caret ranges where operationally practical. 5. Review all packages declaring installation scripts and disable scripts during initial verification: ```bash npm ci --ignore-scripts ``` 6. Run required browser or native-component installation steps separately after reviewing their provenance. 7. Add automated dependency scanning and lockfile source validation to CI. 8. Protect the regenerated lockfile with code review and repository integrity controls.
