257
all 19 comments
sorted by: hot top new old
[-] cockmushroom@reddthat.com 1 points 5 days ago

Pebcak.

I write this as someone who fully hates npm and javascript, but it's not even a package manager issue. The issue is that someone gets hacked and their credentials get stolen. This could happen to any ecosystem, it's just more likely to be beneficial if you target JS because of ubiquity.

People would need to develop entirely new credential management protocols to circumvent this and they'd probably be risky to automate to the same degree of convenience that we have now so, unless you're looking to spin up containers for each and every step of development or, god forbid, write/vendor your dependencies it's actually not easy at all to prevent this sort of thing.

[-] Technus@lemmy.zip 98 points 1 week ago* (last edited 1 week ago)

Interestingly, developers in ecosystems like Go, Rust, and those utilizing native Web APIs—where robust standard libraries drastically reduce reliance on third-party code and strict cryptographic verification is built into the core toolchain—reported zero instances of a college dropout’s weekend project wiping out global logistics infrastructure today.

As someone who's built a career in Rust, it is 100% susceptible to an attack like this. The community is just generally paranoid enough to avoid depending on super niche packages.

Even so, Cargo still doesn't have code signing and crates.io doesn't have 2FA. They just barely rolled out email alerts for new crates being published with your API key.

And there's dozens of single-author crates that are depended upon by millions of lines of code, any one of which could easily be a vector in a supply chain attack. In fact there have been attempted supply chain attacks against crates.io, but to my knowledge they've all relied on typo-squatting.

We're definitely overdue for a major attack.

[-] rtxn@lemmy.world 10 points 1 week ago* (last edited 1 week ago)

Today I had to build and install an application using Crates. It recursively pulled 700 other packages and gave me a gut feeling comparable to testicular torsion. I don't care how paranoid the community is, it only takes one careless maintainer to node-ipc or left-pad an entire dependency tree.

[-] RustyNova@lemmy.world 9 points 1 week ago

Crates.io does support trusted publishing for GitHub and gitlab. It's not much, but it's Honest work.

... I which it supported forgego

[-] Technus@lemmy.zip 13 points 1 week ago

It's not enforced though, and there's no way as a consumer to see how a crate was published.

To be extremely fair, crates.io has a huge maintenance bottleneck because AFAIK it doesn't even have a single dedicated developer. But that's definitely a big part of the problem.

The Rust Foundation is really just not pulling in enough revenue to support the project properly. They really ought to figure out more revenue streams than just sponsorships and donations.

[-] Whostosay@sh.itjust.works 8 points 1 week ago

Nice. I've always been paranoid of typo squatting but never knew it had an official name or people that implement it. Thanks for the share

[-] iocase@lemmy.zip 6 points 1 week ago

I guess one benefit is rust development often doesn't use bleeding edge version for everything, where you pull the entirety of crates.io through your machine when you open your IDE. From what I've seen most projects use == versions and lock files.

I don't know enough about rust though. Could an attacker change historical crate versions to a payload and then cargo pulls them because they changed? Or will cargo only pull an update if you change to a different version on your machine?

[-] Technus@lemmy.zip 6 points 1 week ago

You can't overwrite previously published versions.

Application projects are recommended to check-in the Cargo.lock which pins dependency versions but you can always just run cargo update at any time which automatically upgrades all dependencies to the newest version allowed by the Cargo.toml.

Some projects get around this by pinning the dependency in the Cargo.toml (using =) or by vendoring all their dependencies, which is a huge pain in the ass.

[-] Miaou@jlai.lu 3 points 1 week ago

Cargo does not respect lockfiles by default, AFAIK. You need to explicitly pass the --locked flag.

[-] Technus@lemmy.zip 2 points 1 week ago

When you cargo install a binary, it ignores lockfiles. If you clone a project and build it, it respects the Cargo.lock that was checked in.

[-] brucethemoose@lemmy.world 2 points 1 week ago

That sounds better and worse. An attack could persist past one specific version without anyone noticing for a bit.

[-] caseyweederman@lemmy.ca 22 points 1 week ago

I can tell without clicking that it's Snaps

[-] caseyweederman@lemmy.ca 50 points 1 week ago
[-] ikidd@lemmy.dbzer0.com 38 points 1 week ago

You're wrong again. It's also snaps.

[-] eager_eagle@lemmy.world 8 points 1 week ago
[-] Midnitte@beehaw.org 7 points 1 week ago

Too lazy to check, but did they parody the entire Onion article or just the headline? Lol

[-] Venator@lemmy.nz -2 points 1 week ago* (last edited 1 week ago)

i was also too lazy to check, so I asked claude, it said:

The parody covers the full article structure — headline, location, opening quote, quoted speaker, closing "at press time" paragraph, and a final spokesperson quote — not just the headline

[-] drosophila@lemmy.blahaj.zone 6 points 1 week ago

AI image in header. Didn't read.

this post was submitted on 16 May 2026
257 points (98.1% liked)

Programmer Humor

31576 readers
1754 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS