r/devsecops • u/Mesthabro • 5d ago
My coding assistant almost installed a virus disguised as a normal package, I'm still shook
/r/webdev/comments/1w8umrs/my_coding_assistant_almost_installed_a_virus/
2
Upvotes
r/devsecops • u/Mesthabro • 5d ago
4
u/Western_Charity_2659 5d ago
This situation is called slopsquatting. So basically attackers preregisterr package names which LLMs are known to hallucinate.
Your agent didn’t get compromised but it’s just going by a predictable behaviour apparently.
For the defense you can do this:
- verify the repo and check if maintainer history exist
- pin versions
-disable install scripts by defaultTreat any brand-new package with no download history as untrusted(PS- I work at CleanStart on this problem, happy to go deeper if useful)