DEV Community

aaditya_dev
aaditya_dev

Posted on

GhostPkg Shield (v1.0.4): Catching AI-Hallucinated Packages in VS Code

I built GhostPkg Shield (v1.0.4) after running into AI-suggested imports and dependency names that did not exist on npm or PyPI—the exact gap slopsquatting relies on if someone registers those names later.

What It Checks

  • Scans JS/TS/Python files and package.json / requirements.txt
  • Checks packages against npm, PyPI, and OSV/GHSA advisories
  • Flags newly published packages
  • Shows hover details and Quick Fixes (Ctrl+.)

Handling Internal & Private Packages

You can configure a .ghostpkgignore file with wildcards and ecosystem prefixes (like npm: or pypi:) so internal or private names aren't noisy false alarms.

Privacy & Limitations

  • Lookups are read-only against public registries without uploading your source code.
  • Scanning requires network access.

You can install v1.0.4 and check the full feature list, settings, commands, and .ghostpkgignore examples on the VS Code Marketplace listing.

What edge cases in import or manifest parsing—or how you handle internal packages—would you test first?

Top comments (0)