T08 · Insecure Dependencies
- Location
SKILL.md:36- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
- Remediation
View remediation
``` 2. Prefer project-local installation and invoke the binary through a controlled package script or verified local path instead of using `-g`. 3. Commit and enforce a lockfile with integrity metadata where the runtime model supports it. 4. Verify the package publisher, repository, signatures or attestations, and release provenance before recommending installation. 5. Disable npm lifecycle scripts during acquisition when they are not required: ```bash npm install --ignore-scripts --save-exact meitu-cli@ ``` 6. Document and audit any lifecycle scripts that are required before allowing them to run. 7. Avoid advising users to install the package with `sudo` or another elevated account. ]]>
