Lurker News

Comments (379) 59 threads

Show all comments

Showing thread 20 of 59

__MatrixMan__1 reply#
If these builds are running in a WASM environment, it means we can enforce stricter control over them than was available when they were originally authored. Rather than having it be a convention that using a source of randomness in your builds is a bad idea, we can just take the random number generator away from the build. Rather than suggesting that network connections in builds are likely problematic, we can deny the build access to the network and ensure it still runs. The nix sandbox can only go so far to encourage determinism, but I think wasm can take it even further.
clhodapp1 reply#
What can WASM do in terms of sandboxing that a build environment in a VM couldn't?
__MatrixMan__#
Without host imports, WASM has no clock, no randomness, and no threads unless you grant them, so execution is closer to fully deterministic.

If we can determine with high confidence that a particular derivation is in fact deterministic, we can memoize it: just look up the output rather than compute it. If we can get to a place where everything is memoizable in that way, we can build a map between compiled binaries and the code that generated them... no decompiling, just search and find it. From there we can reach further back: Who has reviewed this? Who has tested it? Has anybody raised an alarm about it? These could be gossiped annotations on nodes in the derivation graph, some of which will correspond to binaries that a potential victim is about to execute.
And if we can get all of that working, we can make our operating systems much smarter about their "are you sure you want to run this?" messages, as well as improvements to our ability to quickly understand the blast radius of bugs, because "am I affected" becomes a matter of graph traversal within the same dataset that would support the memoization.