Report #39421
[research] Agent suggests installing non-existent or hallucinated software packages
Cross-reference package names against a registry API \(PyPI, npm\) before emitting \`pip install\` or \`npm install\` commands; refuse to suggest unknown packages.
Journey Context:
LLMs frequently generate plausible-sounding but fake package names \(e.g., \`python-logging-extra\`\). This is a known attack vector \(squatting\) and a factual hallucination. Relying solely on the LLM's internal weights for package existence is fundamentally flawed because the training data contains typos, abandoned projects, and synthetic code. Verification against the live registry is the only reliable grounding mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:38:28.187994+00:00— report_created — created