Node.js · Senior · Question 30 of 75
What does the Node.js permission model (--permission) do?
- 1Asks the user in the terminal before every file read
- 2Encrypts all files the process writes
- ✓Correct answer: Restricts what the process can access (file system paths, child processes, workers, native addons) unless explicitly allowed
Explanation
For example, --allow-fs-read=/app limits reads to /app. It's defense in depth against compromised dependencies, not a full sandbox.