5 ms·
So, if I use an editor config off the Internet, I need to inspect it for malware, because it's code, not configuration? Yes, there are languages for configurati
by nikolay 3y ago
So, if I use an editor config off the Internet, I need to inspect it for malware, because it's code, not configuration? Yes, there are languages for configuration - Jsonnet, Starlark, Dhall, which are execution safe - unlike Lisp and Lua!
- mtlmtlmtlmtl 3y agoDo you inspect all the code you run on your computer? You probably got all of it off the internet, except for the firmware blobs you couldn't even inspect if you wanted to. And hell, even an "execution safe" configuration can contain malware if there's a parser bug. At some point you have to choose who to trust and not to trust to write code that runs on your system, and all you can really do is try to verify that they did in fact write it, and run untrusted code in isolation from sensitive data.
- nikolay 3y agoI install software from credible sources. I do reuse configs from dotfiles off the Internet - just like most people do. There are way more configs out there than there are software projects.
- pixel8account 3y agoYou already face the same threat then. Many, if not most, nontrivial programs have at least one way to escalate to arbitrary code execution from config. For example sway has exec, basically any useful editor has "on save actions", etc. No need for a Turing complete language when you can just shell out.
- xigoi 3y agoWhy would you use an entire config off the internet?
- dietr1ch 3y agoWhenever I update my spacemacs config+packages I'm kind of doing that, there's no way you can honestly convince yourself that you thoroughly reviewed everything, but I guess the same applies to when you update your boring text editor's binary and forget to opt-out to some new feature you may not want as your old config might not mean the same thing now. I think the real problem is around being able to trust your entire system. It'd help much more to have a better capability system so my rouge text editor can't upload my photos or credit card info from my browser profile to the internet, but today things kind of work because of tons of well intended and behaved people collaborating.
- bobbyskelton41 3y agoFWIW, the plugin system is supposed to have sandboxing as well.
- Zambyte 3y agoScheme has sandboxing in the form of environments. You can evaluate[0] / load[1] untrusted code by applying an environment specifier[2] with all of the symbols you trust the code to use. For example, if you don't want the code to be able to use IO, simply don't add (scheme read) and (scheme write) to the environment that you eval / load the code with. [0] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520eval%29/eval https://index.scheme.org/filterset/r7rs_small/%28scheme%2520... [1] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520load%29/load https://index.scheme.org/filterset/r7rs_small/%28scheme%2520... [2] https://index.scheme.org/filterset/r7rs_small/%28scheme%2520eval%29/environment https://index.scheme.org/filterset/r7rs_small/%28scheme%2520...