Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghost-sandbox

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-sandbox

Sandbox for loading node modules extracted from Ghost

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Ghost Sandbox

This module was extracted from the Ghost blogging platform project. Its sole purpose is to create a sandboxed environment for Node.js modules.

Installation

npm install ghost-sandbox

Example 1: Using a whitelist

Using a whitelist will only allow the the sandboxed module to require the listed modules.

"use strict";

const Sandbox = require('ghost-sandbox');

const sandbox = new Sandbox({
  whitelist: ['when', 'lodash', ...]
});

const sandboxedModule = sandbox.loadWidget(modulePath);

Example 2: Using a blacklist

Using a blacklist will only reject the listed modules.

"use strict";

const Sandbox = require('ghost-sandbox');

const sandbox = new Sandbox({
  blacklist: ['path', 'fs', ...]
});

const sandboxedModule = sandbox.loadWidget(modulePath);

Note: If you include both options, the whitelist will supersede the blacklist.

License

(MIT License)

Keywords

FAQs

Package last updated on 07 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc