Re:Deno Is a Browser for Code
by jfkebwjsbx on Friday May 29, 2020 @07:33AM
(#23348734)
The 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...
It'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.
Re:Deno Is a Browser for Code
by erik_seaberg on Friday May 29, 2020 @11:00PM
(#23358095)
Loading 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.
I 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++.
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.