scan_hallucinated_packages
Detect hallucinated and slopsquatted packages in your repository by scanning phantom imports, typosquats, and npm registry 404s. Run on AI-generated code before npm install.
Instructions
Detect AI-hallucinated and slopsquatted packages in a repo — the supply-chain seam commodity SCA misses. OFFLINE (deterministic): flags phantom imports (a package imported in source but absent from every package.json — a classic LLM hallucination tell) and typosquats of popular packages. ONLINE (opt-in, default on; gracefully degrades offline): adds npm-registry truth — packages that return 404 (definitive hallucination) and brand-new low-download packages (slopsquat-registration pattern). Run on AI-generated code at PR time, before npm install. Pass online:false for a fully deterministic, air-gapped scan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository root to scan (default current directory) | . |
| format | No | Output format: markdown (human) or json (guardvibe.slopscan.v1 for agents) | markdown |
| online | No | Query the npm registry for existence/age/downloads. false = deterministic offline-only (phantom imports + typosquats). |