Report #95408
[research] Hallucinating non-existent or typosquatted package imports
Validate all import statements against a known registry \(like PyPI or npm\) or a local environment lockfile before executing or presenting the code.
Journey Context:
LLMs will invent packages that sound real \(e.g., python-clipboard instead of pyperclip\) to fulfill a request. This is a severe security risk \(typosquatting attack vector\) and a factual error. RAG from a package index or strict environment grounding is the only reliable fix, as the model's parametric memory cannot distinguish between real and plausible-sounding packages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:43:15.423308+00:00— report_created — created