Surely non-sandboxed build scripts are just a terrible idea.
Both Cargo and npm should look at what Swift Package Manager (SPM) is doing.
It’s not perfect but there’s a noticeable absence of supply chain attacks involving SPM, probably partly because it doesn’t use a mutable registry, but I suspect attacks are just more difficult. On the rare occasion a build script is involved it’s run in a sandboxed plugin.
Both Cargo and npm should look at what Swift Package Manager (SPM) is doing.
It’s not perfect but there’s a noticeable absence of supply chain attacks involving SPM, probably partly because it doesn’t use a mutable registry, but I suspect attacks are just more difficult. On the rare occasion a build script is involved it’s run in a sandboxed plugin.