@endo/compartment-mapper

The compartment mapper assembles Node applications in a sandbox


Keywords
node, endo, package, compartment, capabilities, captp, hardened, javascript, multi-tenant, ocaps, powerbox, prototype-pollution, sandbox, security, supply-chain
License
Apache-2.0
Install
npm install @endo/compartment-mapper@1.1.4

Documentation

Endo

build status contributing license

Endo is a JavaScript platform under development for secure communication among objects within one process and distributed between mutually suspicious machines.

The foundation of Endo is Hardened JavaScript as implemented by ses, a tamper-proof JavaScript environment that allows safe execution of arbitrary programs in Compartments. Most JavaScript libraries built for Node.js, either in CommonJS or ECMAScript module format, are suitable for running in Endo without modification, since such programs rarely tamper with global scope or shared intrinsic objects. The exception is shims, which require special treatment and express consent to work with Endo.

Endo protects program integrity both in-process and in distributed systems. Hardened JavaScript protects local integrity, defending an application against supply chain attacks: hacks that enter through upgrades to third-party dependencies. Endo does this by encouraging the Principle of Least Authority.

POLA explained in 3 minutes: Opening Statement on SOSP 50th Anniversary Panel, Mark Miller:

Video presentation explaining POLA in 3 minutes

POLA explained in 15 minutes: Navigating the Attack Surface to achieve a multiplicative reduction in risk, Mark Miller:

Video presentation explaining POLA in 15 minutes

Since most JavaScript libraries receive powerful capabilities from global objects like fetch or modules like net, LavaMoat generates reviewable policies that determine what capabilities will be distributed to third party dependencies according to evident need, and enforces those policies at runtime with Endo.

For distributed systems, Endo stretches object oriented programming over networks using asynchronous message passing to remote objects with the Handled Promise API and a Capability Transfer Protocol.

Between remote objects and Hardened JavaScript compartments, Endo makes distributed programs easy to program, and easy to reason about integrity. CapTP frees the programmer from needing to create bespoke communication protocols over message ports or byte streams.

Please join the conversation on our Mailing List and Matrix. We record a weekly conference call with the Hardened JavaScript engineering community.

Ruminations on the Name

  • In Greek, "endo-" means "internal" or "within". This is fitting because Endo runs Node within a safe sandbox. This is fitting in turn because Endo is built on the legacy of Google Caja. In Spanish, "caja" means "box" and is related to the Latin word "capsum" and English "capsule", as in "encapsulate".
  • Endo is an anagram of Node and Deno. That is to say, we are not Done yet.
  • The endo command, like the sudo command, is a "do" command. However, instead of escalating privilege, it attenuates privilege.
  • Endo lets applications endow packages with limited powerful objects and modules. As they say, you can't spell "endow" without "endo"!
  • So, "E.N.Do" forms the acronym "Encapsulated Node Do".

So, just as "soo-doo" (super user do) and "soo-doh" (like "pseudo") are valid pronunciations of sudo, "en-doh" and "en-doo" are both valid pronunciations of endo.

Bug Disclosure

Please help us practice coordinated security bug disclosure, by using the instructions in our security guide to report security-sensitive bugs privately.

For non-security bugs, please use the regular Issues page.

License

Endo and its components are Apache 2.0 licensed.