News for hackers. Stuff that matters.
Re:First Look: macOS Monterey Public Beta by viraptor on Friday July 02, 2021 @04:40AM (#27709175)
It really depends on your usage. It can be a security feature for many contexts, but otherwise:

- docker - you need to be able to bind any folder

- IDE - you need to be able to edit basically anything

- office software beyond "I have some things in 'Documents'" - same

- python, ruby, any other interpreter - same

- brew, or any other package manager - same

etc. This simply doesn't work well for many developer workflows. I tried to use a dedicated app for per-app security control like that (can't remember the name anymore) - but for development it was a disaster. It just makes you click "allow" on a popup 10 times a day until you stop paying attention. Now, macos is not at that level yet, but the direction towards that is the complaint usually.

Re:First Look: macOS Monterey Public Beta by evgen on Friday July 02, 2021 @04:52AM (#27709242)
The problem is that your 'developer workflow' sounds like you are assuming a particular level of insecurity that is unwarranted. Learn about the principle of least authority and try to apply it to your workflows. None of the applications you mention need complete access to the filesystem and in every one of those cases the access could be easily limited to a few directories and you would probably never notice.
Re:First Look: macOS Monterey Public Beta by viraptor on Friday July 02, 2021 @05:28AM (#27709509)
Yes/no. The security policies as they are implemented today just aren't possible to effectively use by developers. I've got a project in progress which allows you to go into the context of a specific project as a selinux policy and then work on it that way. It's hard, it's a lot of work, and there are endless edge cases. This is not me giving up, it's actually hard to build a system where you both enforce realistic restrictions and don't end up going "yeah, whatever, I've got enough of those permission questions" after a week.

Consider: An interpreter needs to run homebrew which installs new app, but the same interpreter running a script for your project should not read anything apart from those project files. Same interpreter needs to update local packages via bundle and git, but a random script you run shouldn't be able to access your ssh key via git commands. This is basically impossible to achieve without large compromises outside of selinux right now.

Re:First Look: macOS Monterey Public Beta by fauigerzigerk on Friday July 02, 2021 @06:47AM (#27709925)
>Learn about the principle of least authority and try to apply it to your workflows

So how would you apply this principle to the python interpreter or to a program that gets compiled to a new executable many times during development?

I like the idea of granting folder permissions to regular third party apps I install and use. I always wanted that and I'm glad Apple is moving in this direction with the Mac.

But contrary to regular apps, language runtimes and software under development do not have a specific purpose. The whole point of software development is to create and test arbitrary code. It is pointless to grant privileges to code that changes in arbitrary ways with every keystroke.

During development, privileges have to be granted to the developer account, not to any particular software artifact. I generally think that granting privileges to software and granting privileges to people each has its legitimate place. One isn't generally better or worse than the other.

Re:First Look: macOS Monterey Public Beta by kristiandupont on Friday July 02, 2021 @06:08AM (#27709727)
Why would you want Docker to be able to bind any folder? Or even edit "anything" in your IDE? Don't you have a /projects folder somewhere?

..and, office?! Do you keep spreadsheets in system folders?

Re:First Look: macOS Monterey Public Beta by viraptor on Friday July 02, 2021 @07:29AM (#27710142)
Docker bind to a project folder (common for development) allows the image to take over the shell. Taking over the shell allows taking over the package manager. That allows taking over the system.

I keep spreadsheets in project folders. Allowing full writes to a project folder allows taking over the shell. See above.

Folder-level permissions are not sufficient. Sorry, I shortened it too much, but basically - there's almost no practical difference between allowing writes to a dev project folder and allowing writes everywhere. (It would stop some really trivial attempts) Your actual system folders are safe of course... but who cares about those really?