Hacker News new | ask | show | jobs
by mlinksva 999 days ago
https://www.graalvm.org/latest/security-guide/polyglot-sandb... looks very interesting though enterprise (not open source I assume?) only and maybe only for executing javascript? Or do I misunderstand, or is there other sandboxing support?
2 comments

The Polyglot sandbox is licensed under GFTC: https://www.oracle.com/downloads/licenses/graal-free-license...

ISOLATED and UNTRUSTED require GFTC

CONSTRAINED is also available under open-source licenses.

Only for JavaScript right now. We are working hard on supporting all the other languages!

Developer here. So, if you have more questions, let me know!

Thanks for explaining and for your work!

Not sure I have questions, just generally interested in making it easier/lighter weight/built-in to constrain ambient authority (for example, to mitigate supply chain risks), thus have it be done more.

The Polyglot sandfox feels very loosely analogous to Deno per process (and thus subprocess) permissions, though it looks like ISOLATED and UNTRUSTED can limit a bunch of things not possible with Deno.

We do not do process isolation yet, although we have plans to implement that as well as a fallback strategy.

The advantage of the native-image-isolate-based isolation is that it is much more lightweight. For example, calls from and to the host application are much faster. There is no copying or expensive synchronization necessary. The disadvantage is that we need to do our own protections against attacks, as the OS protections between processes don't apply to such isolates. By default, we deploy software/compiler-based protections but are also very close to supporting hardware like Intel MPK.

If you have more questions, you can also drop by on Slack; we are a friendly bunch: https://www.graalvm.org/slack-invitation/

Many of the configuration settings set by a sandboxing policy are available when creating Polyglot contexts with the Community Edition.
Are you sure? I created a JavaScript Polyglot context in Java with GraalJS CE 21 and...

> Exception in thread "main" Polyglot sandbox limits can only be used with runtimes that support enterprise extensions. The runtime 'GraalVM CE' does not support sandbox extensions.