Live data from Hacker News

Extism makes WebAssembly easy

dylibso.com

71–80 of 100 posts

Re: Extism makes WebAssembly easy

#71

The idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language. https://github.com/WebAssembly/stringref/blob/main/proposals...

While it'd be a nice addition, I wouldn't expect it any time soon. It's currently still a stage 1 proposal, while we've been waiting for years for other proposals to be merged. The last time a proposal was actually finished was over 2 years ago. https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals/blob/main/finished-...

I was going to say that everything around interoperability in Wasm has been stalled for years, but hey, looks like garbage collection has reached phase 4! That's a pretty big one!

The component model (aka interface types aka snowman types aka...) is still stuck is phase 1, though. After almost four years, that's not encouraging.

Re: Extism makes WebAssembly easy

#72
post #23

The thing I want to achieve with WebAssembly is still proving a lot harder than I had anticipated. I want to be able to take strings of untrusted code provided by users and execute them in a safe sandbox. I have all sorts of things I want this for - think custom templates for a web application, custom workflow automation scripts (Zapier-style), running transformations against JSON data. When you're dealing with untru…

The problem you want solved, perfect sandboxing for untrusted code, is only just THE single most important problem in operating system security. If you can solve that then you have the basis of a perfectly secure, unhackable operating system. Anybody claiming to solve that problem at speed in any other software domain can trivially use those same techniques to create a perfectly secure operating system runtime.

So, you have to wonder to yourself, if they can do that why do they not just go and write a unhackable operating system. It is only like one of the single greatest problems of all the commonly used commercial operating systems in what is viewed as one of the most hardcore of software disciplines where solving it would instantly establish you as a supreme software guru. Basically, if you can solve that problem you should make and advertise a unhackable operating system; anything else is selling gold bricks as ballast.

To channel Theo de Raadt of OpenBSD: You are absolutely deluded, if not stupid, if you think that a worldwide collection of software engineers who can't write operating systems or applications without security holes, and then turn around and suddenly write browser sandboxes (originally virtualization layers) without security holes.

Re: Extism makes WebAssembly easy

#73
post #72
post #23

The thing I want to achieve with WebAssembly is still proving a lot harder than I had anticipated. I want to be able to take strings of untrusted code provided by users and execute them in a safe sandbox. I have all sorts of things I want this for - think custom templates for a web application, custom workflow automation scripts (Zapier-style), running transformations against JSON data. When you're dealing with untru…

The problem you want solved, perfect sandboxing for untrusted code, is only just THE single most important problem in operating system security. If you can solve that then you have the basis of a perfectly secure, unhackable operating system. Anybody claiming to solve that problem at speed in any other software domain can trivially use those same techniques to create a perfectly secure operating system runtime. So, y…

The browser has offered this kind of sandboxing for JavaScript for decades at this point.

The reason I'm so excited about WebAssembly for this is that it's not even new technology: it's been supported by widely deployed browsers since 2017.

Re: Extism makes WebAssembly easy

#74

Earlier quoted context omitted.

I really miss forums tbh, what happened to them? It feels like Discord has replaced the good old forum but it's worse in so many ways.

Most forums were awful phpbb nonsense where it was impossible to find the information you wanted. Search always required logging in and the only interface for very long threads was paging through them 10 badly laid out posts at a time. No thank you. Of course modern forums are better. Disqus is ok, and D's forum software is arguably the best thing to come out of the D project. In any case Discord is not a replacement…

What makes the D-language forums so good? Never used them. (https://forum.dlang.org/)

Re: Extism makes WebAssembly easy

#75
post #23

The thing I want to achieve with WebAssembly is still proving a lot harder than I had anticipated. I want to be able to take strings of untrusted code provided by users and execute them in a safe sandbox. I have all sorts of things I want this for - think custom templates for a web application, custom workflow automation scripts (Zapier-style), running transformations against JSON data. When you're dealing with untru…

I created https://github.com/dicej/component-sandbox-demo when you asked about this on the Bytecode Alliance Zulip. Curious if you have any feedback on it.

Oh wow, I hadn't checked in on this. Looks like a much more complete method than the one I explored in https://til.simonwillison.net/webassembly/python-in-a-wasm-s...

Thanks! I'll give this a shot.

Re: Extism makes WebAssembly easy

#76
post #73
post #72

Earlier quoted context omitted.

The problem you want solved, perfect sandboxing for untrusted code, is only just THE single most important problem in operating system security. If you can solve that then you have the basis of a perfectly secure, unhackable operating system. Anybody claiming to solve that problem at speed in any other software domain can trivially use those same techniques to create a perfectly secure operating system runtime. So, y…

The browser has offered this kind of sandboxing for JavaScript for decades at this point. The reason I'm so excited about WebAssembly for this is that it's not even new technology: it's been supported by widely deployed browsers since 2017.

Browser sandbox escapes from untrusted JavaScript are discovered and exploited regularly. JavaScript is much more constrained than the full force of a low level language like WebAssembly, and they can not even get the JavaScript sandbox safe to run truly untrusted or malicious code. Why would something harder to do work when they can not even do the easier thing?

Unless you are just talking about something meant to handle accidentally, not intentionally malicious code. Then sure, it is probably be okay for that. But if you are actually worried about malicious code then, no, browsers (and commercial operating systems) do not provide that. And anybody suggesting they can do that is almost certainly lying unless they also claim to have developed a unhackable operating system/virtual machine as well.

Re: Extism makes WebAssembly easy

#77
post #76
post #73

Earlier quoted context omitted.

The browser has offered this kind of sandboxing for JavaScript for decades at this point. The reason I'm so excited about WebAssembly for this is that it's not even new technology: it's been supported by widely deployed browsers since 2017.

Browser sandbox escapes from untrusted JavaScript are discovered and exploited regularly. JavaScript is much more constrained than the full force of a low level language like WebAssembly, and they can not even get the JavaScript sandbox safe to run truly untrusted or malicious code. Why would something harder to do work when they can not even do the easier thing? Unless you are just talking about something meant to h…

Webassembly is far more constrained in the browser than Javascript. Exploits are flaws in the implementation that can be fixed, but what is being asked for is an environment that has fewer privileges by design.

Re: Extism makes WebAssembly easy

#78
post #61

Earlier quoted context omitted.

"Just" use WASI is not useful advice. I've been trying to do that for my own purposes for over a year. The learning curve on that (as a Python programmer who wants to use WebAssembly for sandboxing) is practically a vertical wall.

I should have said "Just use any WASI compliant runtime". There's a ton of them with these features, and none of the commercial angle.

They have all proven extremely difficult to use for my sandbox case - see other messages in this thread.

Re: Extism makes WebAssembly easy

#79
post #76
post #73

Earlier quoted context omitted.

The browser has offered this kind of sandboxing for JavaScript for decades at this point. The reason I'm so excited about WebAssembly for this is that it's not even new technology: it's been supported by widely deployed browsers since 2017.

Browser sandbox escapes from untrusted JavaScript are discovered and exploited regularly. JavaScript is much more constrained than the full force of a low level language like WebAssembly, and they can not even get the JavaScript sandbox safe to run truly untrusted or malicious code. Why would something harder to do work when they can not even do the easier thing? Unless you are just talking about something meant to h…

I know that it's hard, but I'm not ready to agree that this isn't worth seeking answers to.

AWS run untrusted code on Lambda all the time.

Browsers seem to be handling this pretty well in the face of the most untrustworthy computing environment our species has yet developed. Zero days in browsers are big news, and don't happen very often.

Re: Extism makes WebAssembly easy

#80
post #44

Earlier quoted context omitted.

Note to other maintainers: GitHub does have a nice Q+A feature. Use that, not Discord! https://github.com/features/discussions

Not really a real-time chat replacement thing, so it's not a suitable replacement.

That's a feature. Promote discussions, not chit chat.
Post reply on HN