5 ms·
I wouldn't trust it to be done right. It's like a bank trusting that all their customers will do the right thing. If you want MAC (as opposed to DAC), do it in
by tankenmate 1y ago
I wouldn't trust it to be done right. It's like a bank trusting that all their customers will do the right thing. If you want MAC (as opposed to DAC), do it in the kernel like it's supposed to be; use apparmor or selinux. And both of those methods will allow you to control way more than just which files you can read / write.
- bombela 1y agoYeah but you see, this requires to be deployed along side the application somehow with the help of the ops team. While changing the command line is under control of the application developer.
- tankenmate 1y agoSo security theatre is the best option? I'm not saying this to be cheeky, but it just seems to be an overly shallow option that is trivially easy to end run.
- bombela 1y agoAgreed. How can we offer a solution that is as low or lower friction and does the right thing instead of security theater. At least we could consider this part of a defense in depth. We; humans; always reach for instant gratification. The path of low resistance is the one that wins.
- motorest 1y ago> I wouldn't trust it to be done right. I don't understand this sort of complaint. Would you prefer that they didn't worked on this support ever? Exactly what's your point? Airing trust issues?
- throwup238 1y agoNode allows native addons in packages via the N-API so any native module aren't restricted by those permissions. Deno deals with this via --allow-ffi but these experimental Node permissions have nothing to disable the N-API, they just restrict the Node standard library.
- motorest 1y ago> Node allows native addons in packages via the N-API so any native module aren't restricted by those permissions. (...) Node permissions (...) just restrict the Node standard library. So what? That's clearly laid out in Node's documentation. https://nodejs.org/api/permissions.html#file-system-permissions https://nodejs.org/api/permissions.html#file-system-permissi... What point do you think you're making?
- pfg_ 1y agoWhat is the point of a permissions system that can be trivially bypassed?
- eviks 1y agoTo check a box > need to demonstrate security compliance.
- motorest 1y ago> What is the point of a permissions system that can be trivially bypassed? You seem to be confused. The system is not bypassed. The only argument you can make is that the system covers calls to node:fs, whereas some modules might not use node:fs to access the file system. You control what dependencies you run in your system, and how you design your software. If you choose to design your system in such a way that you absolutely need your Node.js app to have unrestricted access to the file systems, you have the tools to do that. If instead you want to lock down file system access, just use node:fs and flip a switch.
- tracker1 1y agoJust because you have a safe doesn't mean the lock on the front door is useless.