New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postman-sandbox

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-sandbox - npm Package Compare versions

Comparing version 0.0.1-beta.6 to 0.0.1-beta.7

test/unit/sandbox-shenanigans.test.js

26

lib/sandbox/execute.js
var Scope = require('uniscope'),
_ = require('lodash'),
postmanLegacyInterface = require('./postman-legacy-interface'),

@@ -21,5 +20,11 @@ PostmanConsole = require('./console'),

listener: function (prefix, console) {
var scope = Scope.create({
eval: true,
ignore: ['require'],
block: ['bridge']
});
/**
* @param {String} id
* @param {Code} code
* @param {String} code
* @param {Object} options

@@ -33,11 +38,3 @@ * @param {Object} options.masked

var bridge = this,
cursor = _.get(options, 'masked.cursor', {}),
scope = Scope.create({
jailed: false,
console: options.debug,
eval: true
}, _.assign({}, options.globals, {
postman: postmanLegacyInterface.create(options),
console: new PostmanConsole(bridge, cursor, options.debug ? console : null)
}, scopeLibraries)),
cursor = options.masked && options.masked.cursor || {},
dispatchEventName = prefix + id,

@@ -55,2 +52,9 @@ done = (function (dispatchEventName) {

scope.import(scopeLibraries);
scope.import(options.globals);
scope.import({
postman: postmanLegacyInterface.create(options),
console: new PostmanConsole(bridge, cursor, options.debug ? console : null)
});
scope.exec(code, done);

@@ -57,0 +61,0 @@ };

{
"name": "postman-sandbox",
"version": "0.0.1-beta.6",
"version": "0.0.1-beta.7",
"description": "Sandbox for Postman Scripts to run in NodeJS or Chrome",

@@ -42,3 +42,3 @@ "main": "index.js",

"editorconfig": "0.13.2",
"eslint": "3.11.1",
"eslint": "3.12.1",
"eslint-plugin-jsdoc": "2.4.0",

@@ -80,11 +80,11 @@ "eslint-plugin-mocha": "4.7.0",

"cheerio": "0.22.0",
"crypto-js": "3.1.8",
"crypto-js": "3.1.9-1",
"jquery": "3.1.1",
"liquid-json": "0.3.1",
"lodash3": "3.10.1",
"postman-collection": "0.5.7",
"postman-collection": "0.5.8",
"tv4": "1.2.7",
"uniscope": "0.1.1",
"uniscope": "1.1.0",
"xml2js": "0.4.17"
}
}
// @todo use sinopia
describe('console', function () {
describe('console inside sandbox', function () {
this.timeout(1000 * 60);

@@ -4,0 +4,0 @@ var Sandbox = require('../../lib');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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