Report #56445
[research] Inventing non-existent pip/npm packages that sound plausible during code generation
Cross-reference generated package names against a live registry \(PyPI, npm\) or a strict allowlist before executing install commands; refuse to install unknown packages.
Journey Context:
LLMs frequently combine morphemes of popular packages to create hallucinated ones. This is a severe security and factuality risk \(typosquatting attack vector\). Agents often blindly run \`pip install\`. The fix requires an external tool call to verify existence, trading latency for safety.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:14:12.180950+00:00— report_created — created