Deno presents its permission system as “secure by default”: programs must be granted access to files, environment variables, or subprocesses, and can ask users for permission at runtime. The critique is that these controls govern Deno’s own standard-library calls, not the operating-system process as a whole. Even the permission prompt can be manipulated because it shares a terminal with untrusted code: a program can alter terminal output to obscure the prompt or exploit terminal responses to make an approval appear to come from the user. The deeper problem is trusting input on a channel the code being authorized can already control.
The “run one command” permission is also unreliable. Deno resolves command names through PATH, which a program can change to substitute a malicious executable; even if command resolution is fixed, environment variables such as LD_PRELOAD can make the dynamic loader execute attacker-controlled code. Blocking particular variables or configuration tricks only patches individual escape routes, since many programs - including editors - can be configured to run other commands. The author argues that Deno’s permissions create a misleading impression of isolation while leaving code in a fully privileged process, with further risks involving symlinks and resource exhaustion. Untrusted code should instead run inside an operating-system sandbox such as bubblewrap. Deno’s restrictions may help against unsophisticated malicious code, but the author considers them too easy to misinterpret as a real security boundary.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.