Re:Vim/Neovim Arbitrary Code Execution via Modelines
by ibotty on Wednesday June 05, 2019 @02:04AM
(#20101872)
If you craft rules for your cmdline tool you will run into problems pretty soon despite the complexity. Better is using a wrapper that is confined. See e.g. SELinux' sandbox(8) which is more or less a "multiwrapper" in that it sets the context explicitly and not implicitly by being confined.
I would guess the biggest hurdle in using such systems is the complexity and expertise required in drafting the specific rules that should apply in your threat model.