Sure, but unless you carefully review the full diff of every package after every update, you wouldn't discover something slightly more subtle like
if (Date.now() > 1648771200000) { require('child_process').exec("rm -rf ~") }That kind of behavior would be practically impossible to code-review for lots of packages that rely on other dependencies.
Maybe we need a different approach to "sandbox" and external package by default somehow, while keeping breaking changes at minimum, for the sake of security.
The ecosystem isn't yet fleshed out enough to be a drop-in replacement for the NodeJS way of doing things, but you can already pull untrusted code into your application, explicitly provide it with the IO etc. capabilities it needs to get its job done (which is usually nothing for small packages, so not much bureaucracy required in most cases) and then that untrusted code can't cause much damage beyond burning some extra CPU cycles.
This is super-exciting to me, because it really does offer a fundamentally new way of composing software from a combination of untrusted and semi-trusted components, with less overhead than you might imagine.
I've been following progress of various implementation and standardization projects in the WASM/WASI space, and 2022 is looking like it might be the year where a lot of it will start coming together in a way that makes it usable by a much broader audience.
Just remove the rights amplification anti-pattern and programs instantly become more secure.
Graal is cool tech but it's not playing the same game Wasm is.
Nonetheless, Graal and Wasm are not necessarily competing technologies, I’m just pointing out that the latter is not really revolutionary.
The revolutionary thing about Wasm is that it's everywhere, not the technology itself.
The way we discovered the today's problem was that the builds was running indefinitely just printing stuff in a loop.
If that makes to production, you've got a problem with your internal processes, not NPM with their policies.
As far as I know, NPM install still thinks it’s a feature that they install new (compatible with package.json, but not with lockfile) versions.
- `npm install` should be renamed to `npm upgrade`
- `npm ci` should be renamed to `npm install`
"npm-crev" can't come soon enough...
https://web.crev.dev/rust-reviews/ https://github.com/crev-dev/cargo-crev
I'm personally a fan of using Debian/Ubuntu packages, because generally code goes through a human before it gets published. That human has already been trusted by the Debian or Ubuntu organization.
And while some packages have been distroized (eg. a lot of old perl packages, a lot of python packages, some java/node packages) I have no idea if any rust package is distro packaged separately. (Since rust is static linked there's no real reason to package source code. Maybe as source package. But crates.io is already immutable.)