Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Secure EcmaScript

Dan Finlay edited this page Sep 23, 2019 · 7 revisions

SES Concerns

We are using Secure Ecmascript by Agoric to sandbox plugins, and limit their access to global scope and prototypes. It is not yet completely production ready, but it is built on Realms, which is a standards-track browser API.

The underlying Realms shim is already in use in production at both Salesforce and Figma, building confidence in its approach.

When building with the plugin-starter script, you will occasionally hit errors related to loading your scripts into the SES environment. This is usually caused by one of your dependencies trying to access a global API, or overwriting the prototype of a "primordial" like String or Object, or doing something else clever with the JavaScript environment. Sometimes the only way to fix these issues is to submit changes to those dependencies. Other times you may need to open issues on the SES repo itself.

The good news is that generally these fixes encourage better development practices all around, and increase security of your dependencies, so consider this a moment to ensure your plugin code has the highest possible hygiene.

Clone this wiki locally