depguard_guard
Check npm package before install to verify existence, detect typosquatting, and run security audit. Returns allow, warn, or block to prevent unsafe dependencies.
Instructions
MANDATORY: call this BEFORE running npm install, yarn add, or pnpm add — whether the user asked for the package or you decided to install it yourself. Verifies the package exists (blocks hallucinated names), checks for typosquatting, runs security audit, and returns allow/warn/block. If the result is "block" or "warn", do NOT install the package without informing the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | npm package name to check before installing | |
| threshold | No | Score threshold for allow decision (default: 60) | |
| targetLicense | No | Project license for compatibility check (default: MIT) |