{"library":"ses","type":"library","category":null,"description":"SES (Secure EcmaScript) is a JavaScript shim providing a hardened environment for robust security and fearless cooperation. It implements Hardened JavaScript, a subset of JavaScript proposed to ECMA TC39, designed to prevent prototype pollution and other common vulnerabilities. The current stable version, 2.0.0, focuses on plugging side-channel attacks and refining security guarantees. SES operates by 'locking down' the global environment, freezing intrinsic objects, and providing the `Compartment` constructor for creating isolated execution contexts. Each `Compartment` has its own global object and module system but shares hardened, immutable primordials with other compartments. This approach ensures that mutually suspicious code can interact safely via object-capability (ocap) principles, where powers are explicitly granted. The package maintains an active release cadence, with frequent updates across the broader `@endo` ecosystem. Key differentiators include its comprehensive protection against tampering with built-in objects, enforcement of strict mode, and its utility in sandboxing third-party code for applications like blockchain smart contracts and browser extensions, notably used by Agoric and MetaMask.","language":"javascript","status":"active","version":"2.0.0","tags":["javascript","lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","typescript"],"install":[{"cmd":"npm install ses","imports":["import { lockdown } from 'ses';","import { Compartment } from 'ses';","import { harden } from 'ses';","import 'ses'; // Immediately hardens the global environment\nlockdown(); // Explicitly calls the global lockdown function"]},{"cmd":"yarn add ses","imports":[]},{"cmd":"pnpm add ses","imports":[]}],"homepage":null,"github":"https://github.com/endojs/endo","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ses","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/ses/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}