T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Global npm Installation Exposes Users to Supply-Chain Risk
- Content
View full analysis
- Remediation
View remediation
``` 2. Publish and verify the expected npm integrity hash and package provenance or signature where supported. 3. Prefer a project-local installation over a global installation to reduce the scope of package modification: ```bash npm install --save-exact agent-browser@ ``` 4. Commit and enforce a lockfile for source-based installation, and use a frozen or clean installation mode such as `npm ci` or the corresponding pnpm option. 5. Review package lifecycle scripts and transitive dependencies before approving a release. Consider disabling lifecycle scripts during initial retrieval when operationally possible. 6. Pin source installation instructions to an audited commit or release tag instead of the repository's mutable default branch. 7. Document every artifact downloaded by `agent-browser install`, including its source, version, checksum, signature, destination, and required privileges. 8. Avoid running npm or the installer as root or through `sudo`. If operating-system dependencies require elevation, isolate those steps and use an explicit, reviewed package list. 9. Establish an update process that reviews and tests new versions before changing the documented pinned version. ]]>
