Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would go one further and say that the default should be that programs cannot read, open, or see files at all unless they're either explicitly allow-listed to open those files, or the user has given permission for them to open those files (i.e. by using the file name as a command-line argument, or selecting the file in an os-provided file selection dialog box).


I like this about Deno (not to suggest that the runtime is without its flaws). Whenever I try to run a script and it tells me I need to allow e.g. read access to the filesystem, I’m more grateful than annoyed. And it lets you choose the granularity of the permissions that you grant. Hopefully this approach will become more common.

https://deno.com/manual@v1.34.3/basics/permissions


Is that what macOS does? (I'm thinking it's coarser granularity, like asks if a program can see a filesystem tree, for a few such checked trees.)


I don't know; I don't use a Mac.


i think that's only mac store apps.


I see this as one of the big unintended benefits of AppArmor and SELinux: it's easy to filter for the relevant subset of files.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: