← All notes

Deno is secure by default and grants I/O only with permissions

Short answer

Deno is secure by default. Unless you specifically enable it, a program has no access to sensitive APIs [S1]. You grant permissions with --allow-* flags, scoped so a program gets exactly the access it needs [S1]. When an operation is refused, Deno throws a NotCapable error [S1]. Permission state is stored as a quadri-state value [S2].

deno run app.ts
deno run --allow-read=./data app.ts
deno run --allow-net=api.example.com --deny-net=internal.example.com app.ts

Key points

Pitfalls

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Deno documentation (denoland/docs): Copyright (c) 2018-2024 the Deno authors; MIT (https://raw.githubusercontent.com/denoland/docs/main/LICENSE). Deno runtime (denoland/deno): Copyright 2018-2026 the Deno authors; MIT (https://raw.githubusercontent.com/denoland/deno/main/LICENSE.md). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Deno docs, Security and permissions, MIT (denoland/docs); Deno runtime permissions source, MIT (denoland/deno). Copyright (c) 2018-2024 the Deno authors; Copyright 2018-2026 the Deno authors. Notices: Deno documentation (denoland/docs): Copyright (c) 2018-2024 the Deno authors; MIT (https://raw.githubusercontent.com/denoland/docs/main/LICENSE). Deno runtime (denoland/deno): Copyright 2018-2026 the Deno authors; MIT (https://raw.githubusercontent.com/denoland/deno/main/LICENSE.md).

Cite this

Permanent ID: iil:note:xkg3yz5z

iinventedlight. 2026. "Deno is secure by default and grants I/O only with permissions." iinventedlight Library, iil:note:xkg3yz5z, version of 2026-11-11. https://iinventedlight.com/library/notes/deno-permissions/. License: CC-BY-4.0.

@misc{iil_note_xkg3yz5z,
  author = {{iinventedlight}},
  title = {{Deno is secure by default and grants I/O only with permissions}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-11},
  url = {https://iinventedlight.com/library/notes/deno-permissions/},
  note = {Permanent ID iil:note:xkg3yz5z. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/deno-permissions.md.