Skip to content

Consider using ese shim for secure JS code execution #21

@haohanyangdev

Description

@haohanyangdev

SES is a package from a better-maintained repo endojs (previously realm-shim)

Example

import "ses";

const compartment = new Compartment({
  globals: {},
  __options__: true,
});

console.log(
  compartment.evaluate(`
    const a = {};
    a.i = 1;
    a;
    `)
);

output

{i: 1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions