Hardened JavaScript Security

Secure
JavaScript
Execution

Build distributed and decentralized applications with an object capability security model, using OCapN and HardenedJS.

Image

What is Endo?

A distributed secure computing platform that enables safe execution of untrusted code through object capability security and hardened JavaScript environments.

Revolutionary Security Model

Unlike traditional security approaches, Endo implements object capability security where authority is represented by unforgeable references to objects both locally and over a network.

Principle of Least Authority

Components only get the permissions they absolutely need.

Object Capabilities Over Networks

Stretch object capability security between processes and peers, using a familiar, pipelinable, and transport-agnostic message passing notation based on promises.

Standards-Based Hardening

Built on TC39 SES specification for secure JavaScript.

Support for both ESM and CommonJS modules

Our bundler seamlessly weaves old and new modules with a modern bundler, and executes them in isolated, HardenedJS compartments.

// Principle of Least Authority

				
					// Enforce widely adopted best practices.
// E.g., forbid modification to Object.prototype.
import 'ses';
lockdown();

// Make a safe space.
const compartment = new Compartment();

// Grant some limited authority.
compartment.globalThis.request = () => {};
harden(compartment.globalThis);

compartment.evaluate(yourWorstNightmare);

				
			

// Object capabilities

				
					const CounterShape = M.interface('Counter', {
  incr: M.call().returns(M.number()),
});

export const counterExample = () => {
  let counter = 0;
  return makeExo('Counter', CounterShape, {
    incr() {
      counter += 1;
      return counter;
    },
  });
};

const counter = makeCounter();
// Then, elsewhere:
await E(counter).incr();
				
			

// Standards-Based Hardening

				
					import { makeCompartment } from 'endo';

const compartment = makeCompartment({
  globals: { console },
  transforms: [hardenTransform],
});

// Safe execution of untrusted code
const result = compartment.evaluate(`
  // This code runs in isolation
  const data = processUserInput(input);
  return sanitize(data);
`);
				
			

// Support for CommonJS modules

				
					$ bundle-source main.js > main-bundle.json


import { importBundle } from '@endo/import-bundle';
const namespace = await importBundle(bundle, {
  endowments: harden({
    request: () => {},
  }),
});

				
			

Powerful Features

Discover how Endo’s innovative approach enables safer, more reliable distributed computing

Object Capability Security

Fine-grained security through unforgeable object references, eliminating ambient authority.

Hardened JS (SES)

Compartment, lockdown, and harden: all you need to maintain a secure perimeter while safely running arbitrary JavaScript programs.

Secure Compartments

Isolated code execution with controlled communication channels and limited authority.

Distributed Computing

Build distributed applications with secure message passing across network boundaries.

Composable Architecture

Create modular applications where components interact safely without compromising security.

Standards Compliance

Built on TC39 standards including SES and emerging JavaScript security specifications.

Featured Projects

See how leading organizations use Endo to build secure, distributed applications

MetaMask Snaps

Secure plugin architecture using Endo's compartmentalization for safe third-party code execution.

Agoric Platform

Smart contract platform built on Endo's secure JavaScript execution for DeFi applications.

SES Shim

Reference implementation of the SES specification for hardened JavaScript environments.

Recent Discussions

Get Involved

Get involved in the community. Join the mailing list, listen in on a meeting, or request access to one of our online gatherings

Weekly Endo & SES Sync Calls

Join our weekly community calls to stay connected with the Endo platform and the SES engineering effort. The Endo Sync focuses on project priorities, updates, and coordination across workstreams, while the SES Call dives into secure JavaScript patterns, experiments, and capability-based design. Open to all contributors, developers, and anyone interested in the evolution of secure, composable infrastructure.

ECMA Security Working Group

A regular working session of ECMA TC39’s TG3 subgroup focused on JavaScript security. Participants collaborate on proposals, threat models, and mechanisms to strengthen the ECMAScript platform. Open to invited experts and contributors engaged in the secure evolution of the language.

Join Our Mailing List

Join The Conversation on Matrix

Ready to Build Secure Applications and Platforms?

 Join the growing community of developers building the next generation of secure, distributed applications with Endo’s revolutionary security model.