by drdexebtjl · 1mo ago · 0 comments
So, for example, if your backup software is a CLI, you have to give Full Disk Access permissions to your Terminal, not the backup software. And subsequently every other process you start from your terminal will also have Full Disk Access.
Enforcing it per executable down the process hierarchy isn't helpful either: you'll eventually grant it to an interpreter (zsh, python3) and create a hole.
TCC's security model is fundamentally wrong.
Unix solved this decades ago: agents should be their own user. What's missing is the tooling to make disposable users practical, and perhaps cross-platform filesystem ACLs.
There's a program that lets you use it from the terminal here:
https://github.com/AprilNEA/disclaim
I think Apple don't expose it as public API because TCC is meant to map user permission prompts to things the user understands logically as applications, which means things they started. If apps can have the user be prompted to grant permissions to sub-components of themselves it can get very confusing quite rapidly.
The supported way to do this is therefore to just make a proper Mac app with its own bundle ID, sign it, and ask Launch Services to start it up - potentially via XPC. It will get its own TCC permissions set along with its own icon and so on. You can, if necessary, embed this app inside another one, although of course the thing the user sees as the app being given permission will be the identity of the embedded app so that reintroduces the potential for confusion.
I don't know if the amount of machinery is such a big deal now, an LLM can produce the needed code quite quickly. Those sub-processes shouldn't be disclaimed anyway because they'd end up without a proper code signing/bundle identity and get weird permission restrictions that can't be elevated. Claude App makes this mistake, IIRC.
That’s a hand waving if I’ve ever seen one.
How is that going to help?
If the Agent gets launched with is own user is will not have access to ANY of the files that are only read by the user.
Of course, as a user, you need some way to easily modify ACLs to do this, but that’s just a front end concern on top of a solid security model that every OS supports.
This is what dedicated higher-level APIs (like ScreenCaptureKit on mac or XDG portals on linux) are made for.
That is, a messaging app could expose separate conversations as separate files or directories in a virtual file system. File system permissions could then dictate which users can access a conversation.
A screen recording virtual file system can expose each window as a separate file. File system permissions would then dictate which users can enumerate all windows (permissions on the directory) and which users can see specific windows (permissions on the files).
If you take “everything is a file” far enough, it follows logically that controlling access to files lets you control access to anything.