Contents
Start
Building
Beyond Bläck Studio
How it runs
Sharing
Look up
#What protects the writer
- The disk: plugins reach the books only through Bläck Studio, and the disk not at all. Bläck Studio's main process works only in the books and series the writer chose, in its own dialogs, whatever the page asks; and copies into a book only files the writer picked or dropped.
- Plugins' changes: they go through Bläck Studio's own actions, so they can be undone and are saved and committed like the writer's. A document is snapshotted before a plugin first rewrites it, under the plugin's name.
- Deleting: nothing a plugin does deletes for good;
trash moves an item to the trash. - The network: the page and its plugins can't send a request of their own.
app.net.fetch goes through Bläck Studio, which allows only https, only to the hosts in the manifest, and only those the writer allowed. Nor can the page open an address in the browser, or push a book's history to a repository the writer hasn't allowed in Bläck Studio's own window. - Files: a plugin reads and changes only what the writer chose for it, checked in the main process through any links. Settings → Plugins lists what each plugin was given, to take back. "Deleting" a file moves it to the system's trash.
- Programs: only those named in the manifest, by name, without a shell, stopped after a time limit.
- Permissions: the writer allows them in a small window of Bläck Studio's own over the main one, in its theme. No plugin runs there, and the main process takes an answer only from that window, so nothing in the page can answer for the writer. Cancel has the focus, and Allow waits a moment, so a key pressed as it comes up allows nothing. Uninstalling a plugin is asked the same way, and so is adding a list.
- Each its own: each plugin's calls carry a token of its own, made from a secret the page's plugin host is given once, before any plugin loads, with what it's made with taken before any plugin runs. So a sandboxed plugin can't use what another was allowed.
- What remains trust: a plugin in the window shares the page with Bläck Studio, and could in principle interfere with it or with other plugins, as in Obsidian: change the books that are open, or get at what another plugin in the page was allowed. Not the rest of the disk, or the network beyond what plugins were allowed. A sandboxed plugin can do none of this.
- A crash: a plugin that throws shows its error where it happened, and in Settings → Plugins, and the rest of Bläck Studio carries on.
- Safe mode: Plugins → Restart Without Plugins starts Bläck Studio without them.
--safe-mode on the command line does the same.