
Security News
minimatch Patches 3 High-Severity ReDoS Vulnerabilities
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.
@record/web-assembly
Advanced tools
web-assembly is an implementation of the WebAssembly API for secure execution of ECMAScript. It has a footprint of 5KB and does not depend on the DOM.
web-assembly has been designed with efficiency and security in mind. Code is sandboxed purely by means of the JS runtime API. No lexing or parsing is carried out. Security measures are designed to be immune to extensions of the ECMAScript language. The package works in an ES5-compliant manner, making results predictable and security best assessable.
Install this package using NPM:
npm install @record/web-assembly --save-dev
import WebAssembly from '@record/web-assembly';
let sandbox = {console};
WebAssembly.instantiate('console.log("Hello world")', sandbox);
See the WebAssembly API documentation for further details.
web-assembly executes scripts synchronously in the global scope. The
package has no dependencies, that is, tertiary APIs such as DOM or Worker
are not involved. Code is not transpiled.
In order to sandbox code and prevent leaks or side-effects, built-in
objects are
frozen.
That is, any modifications on properties or sub-properties of built-in
objects (such as Object.prototype.toString)
will be discarded (see the behavior of Object.freeze()).
Objects are thoroughly isolated from the host environment.
Variables passed as importObject are completely represented in
the sandbox: methods are callable and properties
are recursively accessible. However, changes made to these
properties are not reflected in the host environment.
Object, Array, Date etc.) and their prototypes are immutable.© 2016 Filip Dalüge, all rights reserved.
FAQs
Sandboxed ECMAScript support for the WebAssembly API
The npm package @record/web-assembly receives a total of 2 weekly downloads. As such, @record/web-assembly popularity was classified as not popular.
We found that @record/web-assembly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.

Research
/Security News
Socket uncovered 26 malicious npm packages tied to North Korea's Contagious Interview campaign, retrieving a live 9-module infostealer and RAT from the adversary's C2.

Research
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.