News for hackers. Stuff that matters.
Re:Lapce – Fast and Powerful Code Editor written in Rust by chrisjc on Tuesday December 14, 2021 @06:30AM (#29550540)
Apologies for lack of my lack of knowledge in this area, but...

Why don't plugins "need to be as trusted"? Obviously bad-actor plugins would be less effective and capable of inflicting any sort of attack on your development OS, but surely the development environment is the perfect vector for attacking the runtime environments that run your artifacts get deployed into?

Not to mention the potential for secrets-harvesting due to sloppy boot-strapping dev-env habits or other bad habits we often engage in during the early development process?

Or does WASI somehow provide protection from these issues?

Re:Lapce – Fast and Powerful Code Editor written in Rust by galgalesh on Tuesday December 14, 2021 @06:43AM (#29550621)
It's all about reduction of surface and giving plugins access to the least amount of info. You expect a linter to only have (read) access to the code it lints. It shouldn't be able to modify files, it shouldn't have network access etc. WASI has a pluggable capability-based security system.

Some advanced linters might want network access but you can show this to the user, so they can make an informed decision about whether to trust that linter and their author with this power.

This isn't airtight security to protect against obviously-malicious authors. This is about creating a system that can deal with the reality that "trust" in an app store entails "a million shades of gray". I might trust a plugin enough to check for errors in my code, but not enough to actually modify my code.

Re:Lapce – Fast and Powerful Code Editor written in Rust by lewantmontreal on Tuesday December 14, 2021 @07:19AM (#29550834)
> You expect a linter to only have (read) access to the code it lints. It shouldn't be able to modify files, it shouldn't have network access etc. WASI has a pluggable capability-based security system.

That sounds absolutely amazing. Are there any desktop apps delivered like this yet? Any operating systems or some sort of runtimes (browsers?) that support them?

I want to install apps on my desktop without worrying about it too much. Sadly currently restricted to PWAs.

Re:Lapce – Fast and Powerful Code Editor written in Rust by rixed on Tuesday December 14, 2021 @11:31PM (#29562111)
> Are there any desktop apps delivered like this yet? Any operating systems or some sort of runtimes (browsers?) that support them?

Ever heard of apparmor?

That's per application security profiles, distributed with any applications on many Linux distributions.

Re:Lapce – Fast and Powerful Code Editor written in Rust by stjohnswarts on Wednesday December 15, 2021 @01:56AM (#29562887)
firejails on linux as well. there are others but that's the only one I'm familiar with.
Re:Lapce – Fast and Powerful Code Editor written in Rust by chrisjc on Tuesday December 14, 2021 @07:00AM (#29550719)
Thanks for taking the time to explain. I guess I was pretty ignorant in thinking that a plugin basically has all access to the dev-env it's written in.

I hadn't really heard of WASI, let alone understand it, but it totally makes sense why you would want to leverage this approach, along with any IDE-specific plugin interfaces/integrations.

Re:Lapce – Fast and Powerful Code Editor written in Rust by laumars on Tuesday December 14, 2021 @06:43AM (#29550614)
The clue is in the first part of the GPs sentence which you latched onto: “sandboxing”.

The code is running inside a virtual machine rather than natively on the host.

Re:Lapce – Fast and Powerful Code Editor written in Rust by chrisjc on Tuesday December 14, 2021 @06:56AM (#29550698)
No, I got that. I understand how the host is protected, but didn't understand how everything inside the "VM" was protected... @galgalesh answers that above.