Report #7573
[research] LLM suggests importing a non-existent package or library
Before adding an import statement for an unfamiliar package, execute a registry query \(e.g., pip install --dry-run, npm view\) or check the project's lockfile. Reject any package not found.
Journey Context:
LLMs hallucinate plausible package names because they predict tokens based on naming conventions, not registry state. This leads to typosquatting vulnerabilities if attackers create the hallucinated package later. Relying on parametric memory for package existence is a known failure mode.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:11:55.256354+00:00— report_created — created