The cloud environment where the code runs might be ephemeral, but it would most likely have access to some not so ephemeral resources that should still be protected.
If one wants to go sandboxing, the right place for it would be in npm, where packages should not be able to modify anything but themselves.
Don’t think within a package manager is the right place. Fundamentally there needs to be an onion layer around the entire activity (ie. a virtual machine, qubeos, oci/container, gitpod, github codespaces, namespace jail).
Example of tasty file that a package manager should never be able to read: /Users/mxey/.ssh/ssh_rsa or /Users/mxey/.netrc
Re:$ sudo rm -rf / === NPM install
by thingification on Tuesday November 09, 2021 @03:02PM
(#29166723)
Fundamentally according to what theory?
https://medium.com/agoric/pola-would-have-prevented-the-even...
Lovely, I had not seen this post before. Thank you for sharing.
Great read. Thanks for sharing
ssh_rsa shouldn't be readable to browser, Spotify, Zoom or whatever is currently running. And browser files should be isolated from any other process etc.
Linux security model (and I suppose other OSes too, but I'm most familiar with) is fundamentally incompatible with desktop environments. Mobile OSes got it much better.
I love Snap because it confines processes to sandbox.
Re:$ sudo rm -rf / === NPM install
by kevinmgranger on Tuesday November 09, 2021 @01:41PM
(#29165575)
Linux _does_ have SELinux. It's just too confusing to use.
It's unusable for anyone but few highly qualified sysadmins.
If good security isn't easily obtainable for tech-savvy person in one hour, there is basically no security.
> This is just one of the reasons why I think by 2023 working with ephemeral cloud-based dev environments will be the standard. Just like CI/CD is today.
Over my dead body will I ever use a cloud environment to write code. tmate[0] might be the closest I ever get.
I get some developers don't care about what they throw aimlessly onto a cloud, but I don't know what's being logged, what's being stored, how long it's being stored, who has access to it, what third-parties have access to it, and so on. The business I own or the one I write code for might care if those files were exposed like that.
Use a local VM. Or a development proxy. The cloud isn't a solution for everything.
[0] https://tmate.io/