logoalt Hacker News

vlovich123today at 2:04 PM2 repliesview on HN

I’m disappointed crates.io doesn’t have a stricter bar for serving a crate that has newly acquired a proc macro or build.rs. That seems like a trivial mitigation.


Replies

weinzierltoday at 2:10 PM

Mitigation for what?

Compromising the code that is then most likely run in a test instead of compromising a build script is just a very slight inconvenience for the attacker.

I'm not particularly fond of arbitrary build scripts either, but restricting them will not help the supply chain issue in a significant way.

Also there are several ways to control build.rs execution in the Cargo ecosystem, for example with cargo-deny.

show 1 reply
praseodymtoday at 2:11 PM

As mentioned by others it’s just as easy for an attacker to modify a crate’s runtime code.

show 1 reply