Skip to content

endojs/endo

Repository files navigation

Endo

build status contributing license

Endo is a framework for powerful JavaScript plugin systems and supply chain attack resistance. Endo includes tools for confinement, communication, and concurrency. These include a shim for Hardened JavaScript, an ECMA TC-39 standards track proposal to make JavaScript a safer and more suitable platform for plugin systems.

Agoric and MetaMask rely on Hardened JavaScript and the SES shim as part of systems that sandbox third-party plugins or smart contracts and mitigate supply chain attacks for production web applications, web extensions, and build systems.

Agoric Logo MetaMask Logo

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.

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.

Endo combines these components to demonstrate their use for a confined plugin system in the Endo Pet-name Dæmon and its CLI.

Please join the conversation on our Mailing List and Matrix. Reach out if you would like an ivitation to our meetings:

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.

Principle of Least Authority

The Principle of Least Authority (Wikipedia) states that a software component should only have access to data and resources that enable it to do its legitimate work.

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

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.