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

restrict

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restrict - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

9

lib/index.js

@@ -66,2 +66,3 @@ /*

function permissionDenied(name, originalMethod) {
return function () {

@@ -74,6 +75,6 @@

// command could be in arguments[0] in case of exec
// or arguments[1][1] in case of execFile
toCheckCommands.push(arguments[0]);
if (arguments.length >= 2 && (arguments[1])[1]) {
toCheckCommands.push((arguments[1])[1]);
// or arguments[1][1] in case of execFile for node v0.10
toCheckCommands.push(arguments[0].split(/\s+/)[0]);
if (arguments.length >= 2 && arguments[1][1]) {
toCheckCommands.push(arguments[1][1].split(/\s+/)[0]);
}

@@ -80,0 +81,0 @@

{
"name": "restrict",
"description": "Restricts applications from calling certain methods on process and all methods on child_process",
"version": "0.0.7",
"version": "0.0.8",
"author": "Rohini Harendra <rohini.raghav@gmail.com>",

@@ -6,0 +6,0 @@ "repository": {

@@ -42,3 +42,5 @@ /*

try {
require('child_process').exec('ls',['-ltr']);
require('child_process').exec('ls');
require('child_process').exec('ls -l /tmp');
require('child_process').spawn('ls', ['-lh', '/usr']);
self.callback(null, {});

@@ -45,0 +47,0 @@ } catch (e) {

Sorry, the diff of this file is not supported yet

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