惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
K
Kaspersky official blog
Scott Helme
Scott Helme
C
CXSECURITY Database RSS Feed - CXSecurity.com
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
L
LINUX DO - 热门话题
C
Cyber Attacks, Cyber Crime and Cyber Security
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
月光博客
月光博客
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
L
Lohrmann on Cybersecurity
Recorded Future
Recorded Future
Latest news
Latest news
V2EX - 技术
V2EX - 技术
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
IT之家
IT之家
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
P
Proofpoint News Feed
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
PCI Perspectives
PCI Perspectives
AWS News Blog
AWS News Blog
H
Help Net Security
S
Security @ Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Full Disclosure
S
Schneier on Security
S
Security Affairs
T
Tenable Blog

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno Zero-config Debugging with Deno and OpenTelemetry | Deno Exploring Art with TypeScript, Jupyter, Polars, and Observable Plot | Deno Deno v Oracle Update 3: Fighting the JavaScript Trademark | Deno Build a custom RAG AI agent in TypeScript and Jupyter | Deno How to get deep traces in your Node.js backend with OTel and Deno | Deno toranoana.deno #20 登録受付中(2025年3月14日) | Deno Node just added TypeScript support. What does that mean for Deno? | Deno The Dino 🦕, the Llama 🦙, and the Whale 🐋 | Deno Publish a lint rule, get a prize | Deno Deno 2.2: OpenTelemetry, Lint Plugins, node:sqlite | Deno If you're not using npm specifiers, you're doing it wrong | Deno How Deno's documentation is evolving | Deno Oracle justified its JavaScript trademark with Node.js—now it wants that ignored | Deno Introducing the JSR open governance board | Deno Intro to Wasm in Deno | Deno Announcing OpenAI on JSR | Deno Deno in 2024 | Deno Goodbye WinterCG, welcome WinterTC | Deno Build a SolidJS app with Deno | Deno Run your Next.js SSR app on Deno Deploy | Deno Solve Advent of Code 2024 with Deno and Win Prizes! | Deno Deno v. Oracle: Canceling the JavaScript Trademark | Deno Deno 2.1: Wasm Imports and other enhancements | Deno Build a Typesafe API with tRPC and Deno | Deno Self-contained Executable Programs with Deno Compile | Deno Build a Database App with Drizzle ORM and Deno | Deno Introducing your new JavaScript package manager: Deno | Deno Announcing Growthbook on JSR | Deno Build an Astro site with Deno | Deno How to convert CommonJS to ESM | Deno Announcing Deno 2 | Deno The Final Touches: What’s New In v2.0.0-rc.10 | Deno Announcing Stable V8 Bindings for Rust | Deno Deno 2.0 Release Candidate | Deno Secure, efficient private npm registries with Cloudsmith and Deno | Deno Painting the Plane as We Fly It: Designing JSR | Deno Introducing Web Cache API support on Deno Deploy | Deno Deno 1.46: The Last 1.x Release | Deno Protect your cloud spend with new Deno Deploy spend limits | Deno What we got wrong about HTTP imports | Deno Benchmarking AWS Lambda Cold Starts Across JavaScript Runtimes | Deno Announcing Supabase on JSR | Deno Deno 1.45: Workspace and Monorepo Support | Deno Introducing KV Backup for Deno Subhosting | Deno A Gentle Intro to TypeScript | Deno Announcing Hono on JSR | Deno How We Made the Deno Language Server Ten Times Faster | Deno How the Guardian uses Deno to audit accessibility and performance across their 2.7 million articles | Deno Introducing More Flexible Domain Association for Deno Subhosting | Deno The stabilization process of the Standard Library has begun | Deno Deno 1.44: Private npm registries, improved Node.js compat, and performance boosts | Deno How we built a secure, performant, multi-tenant cloud platform to run untrusted code | Deno The Deno Standard Library is now available on JSR | Deno How to document your JavaScript package | Deno Your Low Code Solution Needs an Escape Hatch | Deno Deno 1.43: Improved Language Server performance | Deno How Slack used Deno to save months of engineering effort in launching their new platform | Deno JSR Is Not Another Package Manager | Deno Announcing the Hookdeck SDK on JSR | Deno Announcing the Neon Serverless Driver on JSR | Deno An intro to TSConfig for JavaScript Developers | Deno How we built JSR | Deno How Netlify used Deno Subhosting to build a successful edge functions product | Deno Introducing Simpler Project Creation in Deno Deploy | Deno Deno 1.42: Better dependency management with JSR | Deno Introducing deployctl, the command line interface for Deno Deploy | Deno Introducing JSR - the JavaScript Registry | Deno How to add Monaco to a Next.js app and securely run untrusted user code | Deno Survey Results and Roadmap | Deno Deno 1.41: smaller deno compile binaries | Deno
How security and tenant isolation allows Deno Subhosting to run untrusted code securely | Deno
2023-11-27 · via Deno

Deno Subhosting offers the easiest and most secure way to extend your platform’s functionality by allowing third-party developers to write and run custom code. For instance, Deno Subhosting powers Netlify’s edge functions so their users can do more with their sites.

But anytime third-party code is executed in the cloud, security becomes an understandable and critical concern — how can we prevent our developers from writing malicious code that attempts to access other users’ code or even our internal systems?

Diagram of tenant isolation in Deno Deploy and Deno Subhosting

Our V8 isolate cloud uses many tools to isolate each tenant from one another as well as from the underlying operating system. We’ll dive into each below.

Running arbitrary code securely is a top priority for the serverless v8 isolate cloud that powers Deno Deploy and Deno Subhosting, and maximizing tenant isolation was considered at every step of designing our platform. To understand how security considerations were made from the ground up in our serverless platform, let’s first dive into the threat model.

The threat model

Our serverless compute platform allows anyone to deploy and run code on the internet. In order to make sure a single bad actor doesn’t bring down the rest of the system, we’ve developed these 5 directives:

Each deployment (a single tenant) must:

  • Have access only to its own runtime (JavaScript objects, methods)
  • Have access only to its own data (file, code, databases, environment variables)
  • Have no access to Deno Deploy internals, such as the underlying operating system and internal services
  • Not deny resources (e.g. CPU, memory) to other isolates
  • Not use Deno Deploy for unintended use cases (e.g. mining bitcoin)

Given this threat model, there are three main themes in which we can isolate a tenant:

  • API limitations
  • Defense in depth
  • Resource fairness

Let’s go into each below.

API limitations

To prevent the code from malicious behavior, there are many safeguards that limit what is even capable at the application level. This includes:

  • Using V8 isolates: Google defines a V8 isolate as:

…an isolated instance of the V8 engine. V8 isolates have completely separate states. Objects from one isolate must not be used in other isolates.

Each V8 isolate is a sandbox, built in a way that makes it impossible for a program to do anything to another isolate. For instance, there are no JavaScript methods or objects that can be shared between isolates

  • Using a virtualized filesystem: When the code in the deployment uses filesystem methods, they don’t actually touch the filesystem since they are virtualized and scoped to that isolate.

  • Having a separate virtual private cloud (VPC) network: Our serverless platform uses two VPCs — one that is used to route incoming requests from the internet to our runner, and a separate one that the isolates use to access the internet (e.g. if your deployment calls fetch(), it uses this network).

These three work together to provide isolation around the application inside each deployment.

Defense in depth

Beyond simply isolating the application code in each tenant, one of our threat models is to make sure the code cannot also access underlying systems, such as the operating system. There are a few things that our infrastructure uses to guard against that:

  • Running its own process on a more restrictive Deno runtime: While the Deno runtime already offers an opt-in permission system to lock down what a JavaScript program can do, our serverless infrastructure extends this further by using a more restrictive version of Deno. For example, deployments can read their own static assets, but cannot write to the file system.

  • Using Linux namespaces: Namespaces partition Linux kernel resources so that one set of processes sees one set of resources while another set of processes sees a different set of resources. This feature was developed to further isolate services and minimize “blast radius” for changes. This is a common isolation technique used by Docker and Kubernetes.

  • Using seccomp filters: So far, every isolate runs in its own process and namespace, and for it to interact with another process, it would need to use syscalls that it would not use under normal operations. If a process is looking for unusual syscalls, we can detect attempts to break out of the sandbox. Seccomp (“SECure COMPuting”) filters allow us to check if processes are trying to use unusual syscalls and therefore attempt malicious behavior.

These safeguard the process from accessing lower level commands and systems that may allow it to interact with other tenants.

Resource fairness

Finally, another area of security is making sure that each tenant gets to use the resources it’s allotted for. This yields another benefit of making sure that every user of Deno Deploy and Deno Subhosting gets their fair share of resources, and that not one singular user is hogging all the CPU (for instance). The tools below also make sure that people are using our V8 isolate cloud within the terms and conditions (aka not mining bitcoin).

  • Using cgroups: Control groups (“cgroups”) allow us to define boundaries around resource usage (CPU, memory, disk I/O, network ingress/egress, etc.) of one or more processes. When a defined resource limit is exceeded, cgroups automatically throttle a process. The cgroup defense sets an upper limit, which prevents one single deployment or tenant from exceeding CPU usage that could negatively impact the performance of surrounding tenants.

  • Monitoring with our WatchDog: We’ve built our own internal service, WatchDog, that’s watches and monitors CPU utilization and memory across isolates on any given runner. For instance, the WatchDog terminates isolates that exceed their memory limit for some amount of time or block the event loop for a long time (i.e. they have become responsive).

These tools ensure that resources are shared fairly across all tenants and that no singular deployment is exploiting our platform.

Revisiting the threat model

So how do the above tools fit into our threat model? Let’s take a look:

Each deployment (a single tenant) must:

  • Have access only to its own runtime (JavaScript objects, methods)

    This is achieved by running each deployment in its own V8 isolate, having a virtualized filesystem, and having a separate VPC network.

  • Have access only to its own data (file, code, databases, environment variables)

    This is achieved from using its own process, namespaces, and seccomp filters.

  • Have no access to Deno Deploy internals, such as the underlying operating system and internal services

    This is achieved through API limitations and a separate VPC network, as well as defense-in-depth measures like putting each process in a separate namespace and configure seccomp to detect syscalls that the process should not be making.

  • Not deny resources (e.g. CPU, memory) to other isolates

    This is achieved by cgroups and the Deno WatchDog. The cgroup defense sets an upper limit, while the WatchDog terminates isolates that exceed their memory limit for some amount of time, or block the event loop for a long time.

  • Not use Deno Deploy for unintended use cases (e.g. mining bitcoin)

    The Deno WatchDog is programmed to detect unusual behavior that goes against our terms and conditions.

Building a secure organization

Security is an important concern when building for the web. Not only is an opt-in permissions system built right into the runtime, it’s also a top focus for our globally distributed serverless hosting platform. Every decision we made while designing our hosting infrastructure was made with security in mind.

Finally, to drive home our commitment to security beyond our runtime and hosting platform, the Deno company was independently audited and achieved SOC 2 compliance.

Run your users’ untrusted code with confidence. Sign up for Deno Subhosting today.