T08 · Insecure Dependencies
- Location
SKILL.md:199- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
- Remediation
View remediation
``` 2. Pin `node-gyp` and all transitive dependencies through `package.json` and a committed lockfile such as `package-lock.json`. 3. Use reproducible installation after a lockfile has been reviewed: ```bash npm ci ``` 4. Verify that npm uses the expected official registry: ```bash npm config get registry ``` 5. Where practical, enforce package integrity and provenance verification and disable unnecessary lifecycle scripts during dependency retrieval: ```bash npm ci --ignore-scripts ``` Any required build scripts should then be reviewed and invoked explicitly. 6. Do not run npm installation commands with administrator or root privileges. 7. Replace the troubleshooting instruction with a documented, version-pinned setup procedure and periodically review the selected package version and dependency graph for known vulnerabilities. ]]>
