Menu

Hallucinated Packages & Dependency Drift in AI-Assisted Code
πŸ“°

Hallucinated Packages & Dependency Drift in AI-Assisted Code

DEV Community: phpΒ·Muhammad Ali MughalΒ·about 22 hours ago
#c5M0rTdY
#devto#dev#package#packages#composer
Reading 0:00
15s threshold

During a routine review on a client's Laravel and Vue project, one pull request added a Composer package with a perfectly reasonable name for parsing VAT numbers. The code looked fine and the tests passed locally for the author, because he had copied a helper from an assistant's answer and installed the package by hand. The CI build failed with "package not found". The package had never existed. The assistant had invented a plausible name. That time the failure was harmless. The worrying part is that anyone can register a missing name on a public registry, and attackers do watch for names that assistants tend to invent.

I wrote this with help from AI tools and checked every command against Composer 2.8, npm 10 and pnpm 9.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.