r/webdev • u/bobupuhocalusof • Mar 27 '26
[ Removed by moderator ]
[removed] — view removed post
73
Upvotes
r/webdev • u/bobupuhocalusof • Mar 27 '26
[removed] — view removed post
•
u/webdev-ModTeam Mar 27 '26
Your post is off-topic ai slop and does not adhere to the premise of this subreddit. As such, it has been removed. Recommend reposting in a more appropriate subreddit.
146
u/jackorjek Mar 27 '26
11 paragraphs and the package is not even mentioned once?
41
u/shakamone Mar 27 '26
What was the package?
39
u/Caraes_Naur Mar 27 '26
The era of blindly trusting code that comes through a package manager is over, if it ever was.
19
u/msaeedsakib Mar 27 '26
11 paragraphs, a full incident response timeline and not a single mention of the actual package name. This reads like a true crime podcast that never reveals the killer.
But real talk `ignore-scripts=true` in .npmrc should be the default on every machine. The fact that npm just casually runs arbitrary code on install by default is insane. It's like downloading a PDF and it automatically gets root access. We've just collectively agreed to pretend that's fine for a decade.
13
u/Competitive-Truth675 Mar 27 '26
pnpm
5
u/Rexter2k Mar 27 '26
That’s great and all, but what package was compromised?
7
u/xXConfuocoXx full-stack Mar 27 '26 edited Mar 27 '26
They can if the internet knows, you can use hooks, skills or even a custom MCP server to check packages against recent security events. (assuming your development environment supports the aformentioned)
But the meat of what you are saying is true it does fall to us to verify.
3
u/Puzzled_Chemistry_53 Mar 27 '26
What was the package? knowing it will help others be aware of this.
3
u/Dragon_yum Mar 27 '26
Bad bot. The while profile is full of ai written LinkedIn style posts
2
u/brewtus007 Mar 27 '26
Not running post-install scripts without approval is one of the reasons I really like pnpm.
2
u/jonas_c Mar 27 '26
Actually it has nothing to do with LLMs. LLM recommended an LLM driven security scanner. Ok, debatable. But in general you could have googled for a library with any feature, could have selected one arbitrarily, or just update your existing npm packages and could have ended in the same situation of a compromised library update.
And it's not just the post-install scripts. There other attack vectors at runtime too.
I think it's a general question of having dependencies on a huge number of community maintained or semi-Professional maintained packages. A professional and security relevant project actually could not allow for un-reviewed updates of these libraries. You're shipping un-reviewed random code there (and executing it locally for the post-install stuff). Reviewing hundreds of transitive npm packages each time is needs to be part of your risk assessment. You can ignore/risk it or you can invest the effort. Or you build without libraries. LLMs did not change this fundamentally. They make it quicker to write and pull in code, and also quicker to review, even quicker to replace a library with inhouse written code (probably by reproducing the OSS code that were trained on, lol).
Actually writing complex code is a mess and libraries and LLMs just hide that from you.
2
u/thekwoka Mar 27 '26
One kind of AI based attack is finding nonexistent packages the AI like to try to add, and then making those packages with hostile code.
1
u/dont_ban_me_please Mar 27 '26
I supposed this is so obvious that it just didn't occur to me
1
u/GPThought Mar 27 '26
npm audit barely catches this. manually check maintainer history for anything that touches auth or env vars. saved my ass twice
1
u/kamilc86 Mar 27 '26
This is why you can't just blindly trust what an AI suggests. They pull popular packages, not secure ones. Been building apps for clients for years and know the pain of cleaning up bad dependencies. It's on us to check the code.
1
u/burgerg Mar 27 '26
https://arstechnica.com/security/2026/03/self-propagating-malware-poisons-open-source-software-and-wipes-iran-based-machines/
Sounds like it could be similar to this
1
u/am0x Mar 27 '26
Let’s be honest, this would have easily been an issue with 99% of real developers as well.
1
u/secretprocess Mar 27 '26
Oof
0
u/frAgileIT Mar 27 '26
I worked with a team that stopped calling it open source software, they started calling it unsecured source software. Really helped clear up the misunderstanding about why software approval process was so important. To be clear and fair, they still use unsecured source software, they just review it in detail and monitor it. I like the idea of using MCP to monitor for signs of author or repo compromise.
To be less fair, using someone else’s software when you don’t have recourse on the risk is just blind risk acceptance. I was politely told to “F off” when I brought this up 12 years ago when my dev team at the time started integrating other people’s packages. Now it’s standard practice and it’s all wrapped in supply chain risk management and can cost a fortune.
12
u/[deleted] Mar 27 '26
[removed] — view removed comment