Live data from Hacker News

Postmortem: TanStack NPM supply-chain compromise

tanstack.com

71–80 of 501 posts

Re: Postmortem: TanStack NPM supply-chain compromise

#71

TanStack? Jia Tan? Who is falling for this???

its a cult in react web dev circles. Just be glad that you never had to encounter devs who insist that everything must be on "tan" stack.

React Query is great. I’ve used his router and table component as well. IMO his stuff became popular on merit more than some cargo culting à la redux

Re: Postmortem: TanStack NPM supply-chain compromise

#72
post #10

My decision to abandon the JS ecosystem and language entirely continues to pay off. What a mess... I am, however, concerned that this will pwn my workplace. We don't use Tanstack but this seems self-propagating and I doubt all of our dependencies are doing enough to prevent it.

Yeah it's a dumpster fire, but I also don't think the other major ecosystems like say python's pypi are any safer structurally

There are npm supply chain exploits in the news every other day. I'm honestly surprised that something as decentralized as Go Modules is more reliable, but here we are. The fact that we're not seeing these stories about e.g. Maven is not at all surprising, given the limited need for third party libraries and the culture of careful upgrades in the Java ecosystem. If npm proponents want the ecosystem to survive, they need to demand / create better and stop making excuses.

Re: Postmortem: TanStack NPM supply-chain compromise

#73
post #7

Earlier quoted context omitted.

Abandon NPM in exchange for what? Cargo? Go get? Pip install? Every package manager that does not analyze and run tests on the packages being uploaded (like Linux distros do) is vulnerable.

Cargo is spiritually based on NPM so it's not much better. Go Get is closer to always locking dependencies unless you explicitly upgrade them with a go get, so it's much much better in my view. Yes, you can lock deps in NPM/Cargo/etc. but that's not the default. It is the default in Go. In Go projects my policy for upgrading dependencies includes running full AI audit of all code changed across all dependencies, come…

> Yes, you can lock deps in NPM/Cargo/etc. but that's not the default. It is the default in Go.

How is it not the default in npm?

Re: Postmortem: TanStack NPM supply-chain compromise

#74
post #11
post #5

So when do we call out NPM as an easy supply chain vector and also Microsoft's ownership of NPM and their prioritisation of AI at any cost. NPM is the windows of package managers right now.

Now that npm supports --before, yarn supports npmMinimumAge, and pnpm supports minimumReleaseAge, it's quite possible to stay safe and avoid acciasional bleeding-edge upgrades. Stay a couple months into the past, give testers time to look at newer releases and vet their safety (or report an exploit attempt).

npm's immaturity is arguably demonstrated by the fact it is always catching up.

Please correct me if I'm wrong but signed packages are still impractical in NPM which is why supply chain attacks still work by editing existing versions or pushing new point releases without a signature.

Or if you put all of the credentials in GitHub actions which is even more trivially exploitable through the actions marketplace because it is just git with a thin proxy, you have an even wider attack vector

Re: Postmortem: TanStack NPM supply-chain compromise

#75
post #56
post #13

Reminder to secure your npm environments. https://gajus.com/blog/3-pnpm-settings-to-protect-yourself-f... Just a handful of settings to save a whole lot of trouble.

Wild claim that setting the minimum age to 7 days will result in me "never" getting a supply chain npm vuln.

[deleted]

Re: Postmortem: TanStack NPM supply-chain compromise

#76
post #61

> it installs that commit's declared dependencies (which include bun) and then runs its prepare lifecycle script Again? How have lifecycle scripts not instantly been defaulted off? Yes breaking things is bad, but come on, this keeps happening, the fix is easy, and if an *javascript* build relies of dependendlcy of dependency's pulled build time script, then it's worth paying in braincells or tokens to digure it out a…

If the payload couldn't execute at install time, it would at runtime? Disabling prepare scripts does not seem like an effective countermeasure.

Re: Postmortem: TanStack NPM supply-chain compromise

#77

I think we are at the point where everyone really needs to run each project in its own vm. Given the recent lpe vulns docker 100% won’t cut it. And containers were never meant primarily as a security boundary anyways

Luckily, projects using more secure language ecosystems like C and C++ are spared this kind of problems :-)

[dead]

Re: Postmortem: TanStack NPM supply-chain compromise

#78
post #56
post #13

Reminder to secure your npm environments. https://gajus.com/blog/3-pnpm-settings-to-protect-yourself-f... Just a handful of settings to save a whole lot of trouble.

Wild claim that setting the minimum age to 7 days will result in me "never" getting a supply chain npm vuln.

In this case it would have, because the compromised packages were pulled within 3 hours.

Re: Postmortem: TanStack NPM supply-chain compromise

#79

I think we are at the point where everyone really needs to run each project in its own vm. Given the recent lpe vulns docker 100% won’t cut it. And containers were never meant primarily as a security boundary anyways

Or a vm per container, if you insist on containers. I've have a couple of relaxed weeks recently due to running everything on VMs rather than some random Kubernetes service.

Re: Postmortem: TanStack NPM supply-chain compromise

#80
post #7

Earlier quoted context omitted.

Abandon NPM in exchange for what? Cargo? Go get? Pip install? Every package manager that does not analyze and run tests on the packages being uploaded (like Linux distros do) is vulnerable.

Both Cargo and Go's package manager are a lot better. Can you name comparable security incidents they've had in the last 5 years? Idk about Python, I refuse to use that language for other reasons.

It makes more sense to attack packages in NPM since it's by far the most popular package manager.
Post reply on HN