Running untrusted CMS plugins in WebAssembly hatamoto.dev · 10 points · 0 commen...
HN Best 200 @best
Running untrusted CMS plugins in WebAssembly hatamoto.dev · 10 points · 0 comments · HN thread
TL;DR The author of Hatamoto, a Go CMS, describes how it runs third-party plugins as WebAssembly modules on Extism and wazero instead of in-process code like WordPress plugins. The post covers the sandbox defaults, timeouts, instance pooling, per-plugin Postgres roles and a guarded HTTP fetch, and it lists what WASM does not protect against, such as visitor-side tracking and template script injection. The post has no comments yet, and the author invites people to try to break the sandbox.
- Plugins run as WebAssembly modules via Extism on wazero, a pure-Go runtime, so the server stays a single static binary without cgo.
- By default a plugin gets an empty filesystem, no network, a memory cap from its manifest, and a timeout of 250 ms for filters or 10 s for actions.
- Every host call goes through one import, hm_call, which checks it against capabilities the owner granted at install time.
- Each plugin using the database gets its own Postgres login role that owns only one schema, which the author treats as the real security boundary rather than the SQL guard.
- The http.fetch host call allows only manifest-listed hosts, refuses private and loopback addresses at dial time, resolves DNS once, and re-checks every redirect.
- Stated limits: plugin CSS and markup can still track visitors in their browsers, the new template scanner is untested by outsiders, and themes are fully trusted code.
Discussion No one has commented on the post yet, so there is no discussion to summarize.