aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-13 20:08:50 +0200
committeruser <user@clank>2026-08-13 20:08:50 +0200
commitfb7076efd6d3ab5c1d36b6e554045d87b43c15b6 (patch)
tree5ef521792cd35974cd83814dba9e68edadedcc30 /docs
parentcheck: stop the live check leaking a server per run (diff)
downloadsl0ppi-fb7076efd6d3ab5c1d36b6e554045d87b43c15b6.tar.gz
sl0ppi-fb7076efd6d3ab5c1d36b6e554045d87b43c15b6.tar.xz
sl0ppi-fb7076efd6d3ab5c1d36b6e554045d87b43c15b6.zip
sl0p: the plugins we ship do not ask for permission
pane-finder requests three permissions as it loads, so the first press of a keybinding we ship opened a consent screen instead of a fuzzy finder. Prompting is right for a wasm you found on the internet and wrong for the ones that come in our own tarball. plugin_is_shipped_with_sl0ppi (zellij-utils/src/input/permission.rs) grants those implicitly, through the same instruction a human "y" produces, so the plugin's permissions are set and recorded exactly as before. "Ours" is narrow on purpose: - builtins, asked via the existing PluginConfig::is_builtin -- the same predicate check_command_permission already uses to exempt them, so the two cannot drift; - files inside a plugin directory we install into: the config dir's plugins/ and the data dir's plugins/; - nothing else. Remote plugins are never trusted, paths are normalised lexically first so plugins/../../evil.wasm is not "inside" the dir, and the directories are derived from the environment and default locations -- so getting them wrong costs a prompt and can never grant one elsewhere. The trade, documented in config/README.md: <config dir>/plugins/ is now a trusted directory. Anything able to write there can already bind arbitrary commands to a key in config.kdl, so a consent screen for the wasm beside it was not buying anything -- but it does mean plugins/ is not a download folder. packaging/checks/plugin-permissions-live.py drives both halves on a real session: the shipped plugin must run without the prompt, and the SAME wasm loaded from outside the plugin dir must still ask. Confirmed by disabling the rule and watching the first half fail with the exact "asks permission to ... Allow? (y/n)" screen it was written against.
Diffstat (limited to 'docs')
-rw-r--r--docs/HANDOVER.md19
-rw-r--r--docs/roadmap.md36
2 files changed, 54 insertions, 1 deletions
diff --git a/docs/HANDOVER.md b/docs/HANDOVER.md
index 7590af8..b1dc84e 100644
--- a/docs/HANDOVER.md
+++ b/docs/HANDOVER.md
@@ -91,6 +91,19 @@ Not drawn on floating panes on purpose: the PIN control owns that corner and is
hit-tested by its drawn position, so anything to its right moves it out from
under the pointer (`test_ctrl_click_on_floating_pin_button_toggles_pin`).
+## Also done: shipped plugins no longer ask for permission
+
+pane-finder opened a three-item consent screen the first time you pressed its
+keybinding. Plugins we ship are now granted implicitly --
+`plugin_is_shipped_with_sl0ppi` in `zellij-utils/src/input/permission.rs`,
+checked by `packaging/checks/plugin-permissions-live.py`.
+
+The part to keep in mind: **`<config dir>/plugins/` is now a trusted
+directory** (documented in `config/README.md`). The same wasm from anywhere else
+still prompts, and remote plugins are never trusted. If you ever need the
+opposite for a specific plugin, the honest fix is to load it from outside that
+directory rather than to widen the rule.
+
## Where the project is
Everything is committed and pushed to `ssh://git@git.sl0p.foo:39327/srv/git/sl0ppi.git`.
@@ -169,7 +182,11 @@ bar. See `docs/roadmap.md` for each with its measurements.
is inset from the allocation: use `Pane::frame_rect()` for anything the user
can see, `position_and_size()` only for the layout solver.
- **Clean up test sessions.** A background-created session I left behind is what
- produced a "MY FOCUS" bug report from the user.
+ produced a "MY FOCUS" bug report from the user. The live checks now reap their
+ own servers; anything else you spawn by hand, kill by pid via `comm`.
+- **`send_cli_scroll_up_action` flakes** (scrolled 1 line where the snapshot has
+ 2), seen once in ~10 full runs. It is the CLI-action raciness already tracked
+ above, not a rendering bug -- re-run before chasing it.
## Access
diff --git a/docs/roadmap.md b/docs/roadmap.md
index 9afed17..ef71070 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -257,6 +257,42 @@ If it ever disagrees with the code, do not theorise about the screen: put a
`/tmp/sl0ppij-$UID/sl0ppij-log/`. The server's own geometry settles in one run
what screen-scraping cannot.
+## Fixed: the shipped plugins asked for permission on first launch
+
+pane-finder requests three permissions as it loads, so the first press of its
+keybinding on any new machine opened a consent screen instead of a fuzzy finder
+-- a nag about our own software, on a binding we ship.
+
+Plugins we ship are now granted implicitly: builtins (via the existing
+`PluginConfig::is_builtin`, the same predicate `check_command_permission`
+already uses) and any wasm inside a plugin directory we install into -- the
+config dir's `plugins/` and the data dir's `plugins/`. The rule is
+`plugin_is_shipped_with_sl0ppi` in `zellij-utils/src/input/permission.rs`, and
+it is deliberately narrow:
+
+- the same wasm from any other path still prompts;
+- remote plugins are never trusted;
+- paths are normalised lexically first, so `plugins/../../evil.wasm` is not
+ "inside" the plugin dir;
+- the trusted directories are derived from the environment and the default
+ locations, so getting them wrong costs a prompt and can never grant one
+ somewhere else.
+
+The trade is that `<config dir>/plugins/` is now a trusted directory, documented
+in `config/README.md`: anything that can write there can already put arbitrary
+commands on a keybinding in `config.kdl`.
+
+**How to re-run the check**:
+
+```bash
+make check-live # includes packaging/checks/plugin-permissions-live.py
+```
+
+It launches the real pane-finder wasm from a temp config dir and asserts it
+runs without the prompt, then launches the *same file* from outside that dir and
+asserts it still asks. Confirmed by disabling the rule and watching the first
+half fail with the exact "asks permission to ... Allow? (y/n)" screen.
+
## Standing risks
**`sl0ppij/target` is a symlink to `~/lol/zellij/target`.** Introduced when the