Crashing out at how poorly npm (Microsoft) is handling this security incident. Eleventy is not affected any more but *lots* of other tools in the JavaScript ecosystem are!
Hours later and the compromised package versions are still public…
Maybe don’t install anything from npm today, folks.
Zach Leatherman 3232 replies 7575 likes3333 reposts11 quote Original on MastodonOriginal on BlueskyAlso posted to Mastodon.
32 replies
I wish we all used socket.dev and published with provenance directly from github.
It's free and takes just minutes to setup with your pipeline.
@localnerve I’m not sure this would fix it? I think https://docs.npmjs.com/trusted-publishers is the new thing that might help prevent bad publishes from other workflows https://docs.npmjs.com/trusted-publishers
This is the workflow we use, yes? I see 11ty has this also. This, combined with the workflow and socket.dev integration is what stopped me at ~10:20am this morning.
It won't fix everything, no.
The error-ex case today, by examining the delta between the source code on github and the package delivered by npmjs, indicates ppl (or agents acting on their behalf) are publishing directly, injecting code. The packages have code different from the repo, and pub provenance eliminates that.
@localnerve ah, yeah — for sure. I just mean that packages using provenance aren’t *required* to use provenance to publish (which was an interesting design decision)
I think we're quickly heading to a point where it will be a requirement.
Ppl doing strategic forks (fork, contribute, but republish with provenance) will help drive this. Ppl with bigger budgets have to drive this for bigger packages.
I cant believe packages like #jest have the dep supply chain they have. That's major.
We gotta get better.
@localnerve @zachleat Personal opinion: Provenance is pretty worthless. https://dlaa.me/blog/post/npmprovenance
-
@khalidabuhakmeh *edited, thank you
-
@khalidabuhakmeh hopefully we can get some workflow improvements to npm to avoid or at least better mitigate these problems
-
@khalidabuhakmeh *eyes narrow*
@zachleat @khalidabuhakmeh 😂 😅 😂 😭
-
simple-swizzle@0.2.3 is *still* public, active, and in the wild. You can see the malicious code on the code browser: https://www.npmjs.com/package/simple-swizzle/v/0.2.3?activeTab=code
Edit: seeing folks boost this one still but editing to say that it’s been resolved
-
-
whew, it’s been taken down a mere 5 hours after publish.
@zachleat the cheap joke: someone at npm finally got VP level permission to turn off Copilot to make the change.
@slab_bulkhead vibe coding our way to a fix
@localnerve your local cache might still have it, I suppose!
Oh eek. Thanks 👍
@zachleat the is-arrayish half of this broke our build today: purely fortunate that (I think that) the people who compromised the package screwed up the package.json. It was rectified pretty fast, but... bit worrying.
@sil yeah, absolutely. `is-arrayish` is a wild package to begin with
@zachleat ya. I'd never heard of it, and was a bit surprised when I found what it was (it turned out, obviously, to be somewhere about nine layers deep in the dependency tree). That trend for single-line packages is pretty annoying.
-
@zachleat But using all manner of random stuff off npm is fine everyone, we definitely don't have a massive issue as an industry 😅
@Lukew something needs to change or folks are going to hop off of the package manager train (and then we’ll have worse problems due to folks not updating things)
@zachleat maybe don't install anything from npm *ever*.
@brucelawson oh no
@zachleat I'm selling CDs of installable binaries of 11ty, earning a fortune
@brucelawson build 50 pages, get the next 50 free!