---
title: "How security and tenant isolation allows Deno Subhosting to run untrusted code securely"
description: "Deno Deploy and Deno Subhosting isolate untrusted tenant code using layered defenses mapped to a five-point threat model: per-deployment V8 isolates, a virtualized filesystem, and separate VPCs for ingress and outbound traffic."
url: "https://swe.quest/articles/how-security-and-tenant-isolation-allows-deno-subhosting-to-run-untrusted-code-bc85ef9b28cccb45"
canonical: "https://deno.com/blog/subhosting-security-run-untrusted-code"
source: "Deno"
published: "2023-11-27"
difficulty: "easy"
kind: "Deep dive"
reading_minutes: 6
tags: ["multi-tenancy","sandboxing","serverless","linux"]
---

# How security and tenant isolation allows Deno Subhosting to run untrusted code securely

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-11-27, 6 min read, Deep dive. Original: [https://deno.com/blog/subhosting-security-run-untrusted-code](https://deno.com/blog/subhosting-security-run-untrusted-code)

## Summary

Deno Deploy and Deno Subhosting isolate untrusted tenant code using layered defenses mapped to a five-point threat model: per-deployment V8 isolates, a virtualized filesystem, and separate VPCs for ingress and outbound traffic. Each isolate runs in its own process on a restricted Deno runtime, inside Linux namespaces, with seccomp filters to detect unusual syscalls. For resource fairness, cgroups cap CPU, memory and I/O, and an internal WatchDog service kills isolates that exceed memory limits, block the event loop, or show abusive patterns such as crypto mining. The mechanisms are described at a high level, without configuration or implementation specifics.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)

## Prerequisites

- V8 isolates ([easy posts on Runtimes & VMs](https://swe.quest/tags/runtimes.md?difficulty=easy))
- Linux namespaces and cgroups ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- serverless platforms ([easy posts on Serverless](https://swe.quest/tags/serverless.md?difficulty=easy))

## Keywords

Deno Subhosting, Deno Deploy, V8 isolates, seccomp, cgroups, Linux namespaces, WatchDog

## Related posts

- [How we built a secure, performant, multi-tenant cloud platform to run untrusted code](https://swe.quest/articles/how-we-built-a-secure-performant-multi-tenant-cloud-platform-to-run-untrusted-2ee4fd4f231472d5.md): Deno · 2024-05-17 · Medium · 10 min read · Multi-tenancy, Serverless, Sandboxing & isolation, CDN & edge, System design
  Deno Deploy runs untrusted JavaScript and TypeScript in pools of V8 isolates inside VMs called runners, split into a control plane for deployments and a data plane of edge regions.
- [The Anatomy of an Isolate Cloud](https://swe.quest/articles/the-anatomy-of-an-isolate-cloud-63ec66f5321e5ffc.md): Deno · 2022-09-27 · Easy · 6 min read · Sandboxing & isolation, Multi-tenancy, Serverless, CDN & edge, Runtimes & VMs
  Deno Deploy runs untrusted user JavaScript in V8 isolates rather than VMs or containers, trading heavier isolation for much lower overhead and faster deploys.
- [Introducing Deno Sandbox](https://swe.quest/articles/introducing-deno-sandbox-ffb8d1f44b3562f3.md): Deno · 2026-02-03 · Medium · 3 min read · Sandboxing & isolation, AI agents, Serverless, Virtualization, Security
  Deno Sandbox runs untrusted, often LLM-generated code in lightweight Linux microVMs on Deno Deploy that boot in under a second and are created via JavaScript or Python SDKs.
- [How immutable scripts in Deno allow Windmill.dev (YC S22) to build production-grade ops](https://swe.quest/articles/how-immutable-scripts-in-deno-allow-windmill-dev-yc-s22-to-build-production-db6cb3961bcb6bf5.md): Deno · 2023-05-18 · Easy · 3 min read · TypeScript, Sandboxing & isolation, Multi-tenancy, Performance engineering
  Windmill.dev, an open-source platform for building internal workflows and UIs from scripts, runs TypeScript on Deno because inline, version-pinned imports make each script a self-contained, reproducible file that is hashed immutably and stored in Postgres.
- [Defense in Depth: How Replit Secures Every Layer of the Vibe Coding Stack](https://swe.quest/articles/defense-in-depth-how-replit-secures-every-layer-of-the-vibe-coding-stack-0d05cbcd7ee6ec9a.md): Replit · 2026-04-21 · Easy · 7 min read · Security, Sandboxing & isolation, Multi-tenancy, Supply chain security, AI for coding
  Replit layers its security controls so that no single one is the last line of defense, from development sandboxes to production hosting.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
