Hatamoto, a Go-based CMS, replaces in-process PHP-style plugins with WebAssembly modules to let site owners install third-party extensions without giving them unrestricted access to the server. Its first design compiled Go plugins into the CMS binary, making installation require a rebuild and leaving plugins able to call anything in the process. The current system runs modules through Extism on the pure-Go wazero runtime. Plugins start with no filesystem or network access, face memory limits and per-call timeouts, and can act only through a host function that checks permissions granted by the owner.
The implementation emphasizes that isolation depends on careful runtime and host design. Calls always have deadlines; failed or trapped instances are discarded, repeated failures temporarily disable a hook, and a LIFO pool plus idle cleanup controls resource use. Compiled-code caches are protected, while an immutable plugin registry avoids locks on requests. Database access uses a separate Postgres role and schema for each plugin; guarded HTTP access restricts hosts and blocks private addresses, DNS rebinding, unsafe redirects, and proxy settings. The system still cannot prevent browser-side tracking through plugin markup or CSS, and template scanning is not treated as a security boundary. Themes remain trusted code, and hardware side channels are out of scope. The central argument is that WASM can sharply limit plugin privileges, but it does not eliminate the need to secure host integrations or trust publishers.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.