3 ms·
Yes this is the common way computers work, but there's no reason to accept it. When today's process model was designed, there was no such thing as github or the
by aboodman 6y ago
Yes this is the common way computers work, but there's no reason to accept it. When today's process model was designed, there was no such thing as github or the internet. The idea of googling for a hunk of code and just pasting it into your app was ... not a thing on anyone's mind.
You might argue people are wrong to do that, but the fact is it's extremely popular. And if we redesign the security model, we can allow people to do it safely.
Imagine if leftpad.js had no privileges to anything, even if included in an application that has privileges to network, disk, etc.
- jfkebwjsbx 6y agoThe fact that something is popular in webdev does not make it right nor popular outside webdev. In almost any other CS field you would be crazy to use non-vetted third-party code and depend on external service providers for your code to simply run. I can only think of draconian DRM, which puts things in perspective...
- aboodman 6y agoIt's popular everywhere. The Go ecosystem, or Rust ecosystem, as an example is just as bad about this as the JS ecosystem. There is a difference, but it's a constant factor. Asymptotically, everyone is just pasting code they found on the internet into their app. Crazy, but true. That's why a per-library sandbox model seems so beneficial.
- erik_seaberg 6y agoLoading classes over the network and running them in a configurable sandbox is what originally excited me about Java, but exploits were found and it's hardly ever used now.
- aboodman 6y agoI mean there will definitely be exploits. It does still seem dramatically different to need to get an escape out of the js sandbox than to just be handed privileges by design. Particularly if (in some glorious future) the js vm is written in a safe language, not C++.