Workbench is now fully sandboxed 🎉
With next release, it will be rated as “Safe” by Flathub and will shield users from accidents or malicious code.
I have removed the session-bus permission. It was used for IPC between Workbench UI and the external previewer.
Moving to a P2P DBus connection wasn't as straightforward as I had hoped, but I'm happy with the result.
Bonus: it is now fully async to prevent UI thread from blocking, and the previewer process will exit when not in use.