T08 · Insecure Dependencies
- Location
SKILL.md:9- Finding
Unpinned Global npm Dependency May Execute Unreviewed Code
- Content
View full analysis
- Remediation
View remediation
``` 2. Prefer a project-local installation over `npm install -g`, and invoke it through a controlled local path or `npm exec` with an exact version. 3. Commit and enforce a lockfile containing resolved versions and integrity hashes. 4. Verify the expected npm registry, package publisher, package signature or provenance, and artifact checksum before installation. 5. Review both the direct package and its transitive dependencies whenever the pinned version is updated. 6. Disable lifecycle scripts with `--ignore-scripts` where the CLI does not require them. If scripts are required, inspect them before installation and execute the installation in a restricted environment. 7. Avoid elevated installation. Run dependency setup as an unprivileged account in a sandbox or container with minimal filesystem, credential, and network access. 8. Retain the existing explicit-consent requirement, but disclose the exact version, registry, script-execution behavior, and installation scope in the consent prompt. ]]>
