all posts

// 9 November 2026 · via Hacker News

Deno permission flags are not a sandbox: what to do

A critique of Deno's permission system argues it can mislead teams. Here is what small teams should check before trusting it with untrusted code.

What happened

A widely discussed blog post on Hacker News argues that Deno’s permission system, the flags such as --allow-read and --allow-run that limit what a script can touch, is weaker than its “secure by default” label suggests. The author raises two problems. First, the permission prompt appears in the same terminal that the untrusted code can write to, so it may be hidden or answered by the code itself. Second, allowing a program by name, such as uname, relies on a PATH lookup, and the script can set environment variables for the child process.

The post is one person’s opinion, and some of the specific issues it mentions are described as patched. Others are described as still open.

Why it matters

Many small teams pick Deno because the permission flags sound like a safety net. That makes it tempting to run third-party packages, user-supplied scripts or AI-generated code with a few flags and call it contained.

The post’s argument is that the flags are a useful guardrail against mistakes, but not a hard boundary against hostile code. If your threat model includes code you do not trust, a boundary that shares a terminal and an environment with that code is a weak place to rely on.

Without a platform team, nobody is usually assigned to question this. The flags end up in a README, and people assume the problem is handled.

What to do this week

  • List where you run Deno, and whether any of that code comes from outside your team: dependencies, plugins, customer scripts or AI agents.
  • Treat permission flags as a second layer, not the first. For untrusted code, add isolation from the operating system: a container with a non-root user, a read-only filesystem, no secrets in its environment and restricted network egress.
  • Avoid broad flags such as --allow-run and --allow-all in CI and production. Where you need to run a binary, check how it is resolved, and prefer full paths.
  • Do not answer permission prompts in a terminal where untrusted code is already running. In automated jobs, deny prompts rather than allow them.
  • Check the Deno issue tracker and release notes for the points raised, and confirm for yourselves which are fixed in the version you run.

Need a hand?

Deciding how much to trust a runtime, and where to put real isolation, is a normal part of our Security & Compliance work. We can review how you run third-party and AI-generated code and suggest practical containment that fits a small team. The first call is free and it is with an engineer, not a salesperson.

Source: I'm not a fan of Deno's security model (2024)

Related service: Security & Compliance

Tell us where it hurts.

The first call is free — and it's with an engineer.