Hacker News new | ask | show | jobs
by __MatrixMan__ 390 days ago
As I see it there are three components of software supply chain security:

- is this actually the binary that comes from that code?

- is that code trustworthy?

- is this binary trustworthy?

Nix focuses on the first. If you can solve that problem, there's still nothing preventing bad guys from publishing malicious code, or from distributing malicious binaries which did not actually come from the code that they claim to, but it forces them to act in the open where they're more likely to get caught--anybody can verify that the correspondence between code and binary doesn't hold.

So if you're worried that one dark day, `curl whoever.com/whatever.sh | bash` will suddenly contain malware when it didn't before, using nix instead will protect you... until you manually approve the malicious update. It's up to you to come up with reasons why you should or shouldn't do that, but at least there will be a commit in your code where things went bad.

If you're wondering whether whatever.sh is safe in the first place, and you want some council of elders to pinky promise that it's safe to run, then I don't think the nix ecosystem has much to offer you.

Personally, I think that solving the latter problems without a robust solution to the first problem is sort of a band-aid solution. So I'm a big fan of the nix approach to supply chain security, but it's important to be aware of what you're not getting, which is a promise that any bits are trustworthy in the first place.

1 comments

Thanks for that detailed argument, especially for pointing out the three necessary components.

I agree even with the following paragraph in principle:

"If you're wondering whether whatever.sh is safe in the first place, and you want some council of elders to pinky promise that it's safe to run, then I don't think the nix ecosystem has much to offer you."

For me it is not so much about what the council of elders says, but more about when FAANG and Co. are OK to run a binary I think needn't worry about the rest. Or to think this further, they should care more about Nix than I should.

These are the solutions to the three components:

> - is this actually the binary that comes from that code?

Reproducible Builds that are also Bootstrappable Builds, starting from a minimal auditable machine code seed.

https://reproducible-builds.org/ https://bootstrappable.org/ https://lwn.net/Articles/983340/ https://stagex.tools/

> - is that code trustworthy?

Socially distributed code auditing:

https://github.com/crev-dev/

> - is this binary trustworthy?

The other two combined should provide this.