diff options
| author | user <user@clank> | 2026-08-13 20:08:50 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-13 20:08:50 +0200 |
| commit | fb7076efd6d3ab5c1d36b6e554045d87b43c15b6 (patch) | |
| tree | 5ef521792cd35974cd83814dba9e68edadedcc30 /cli/src/core/errors.ts | |
| parent | check: stop the live check leaking a server per run (diff) | |
| download | sl0ppi-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 'cli/src/core/errors.ts')
0 files changed, 0 insertions, 0 deletions
