There really is no simple answer to the xz case. We can reduce dependencies, we can strengthen sandboxing, we can make it harder for dependencies to inject code. But fundamentally we still depend on the idea that our dependencies are trustworthy and the only real way to guarantee that is to have strict examination of every single line of code