Report #50464
[research] LLM invents non-existent packages or libraries to satisfy import requirements
Cross-reference generated import statements against a live package registry \(e.g., PyPI, npm\) before attempting installation; constrain imports to a known safe list.
Journey Context:
When an LLM encounters a problem it can't solve with standard libraries, it will often hallucinate a package name that sounds highly plausible \(e.g., smart-utils\). If a developer blindly runs pip install, this can lead to typosquatting attacks or dependency errors. Validation against the registry is a mandatory safety gate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:10:55.526591+00:00— report_created — created