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

@usebruno/js

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@usebruno/js - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

7

package.json
{
"name": "@usebruno/js",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",

@@ -20,3 +20,3 @@ "main": "src/index.js",

"atob": "^2.1.2",
"axios": "^0.26.0",
"axios": "^1.5.1",
"btoa": "^1.2.1",

@@ -32,4 +32,5 @@ "chai": "^4.3.7",

"node-fetch": "2.*",
"uuid": "^9.0.0"
"uuid": "^9.0.0",
"node-vault": "^0.10.2"
}
}
const Handlebars = require('handlebars');
const { cloneDeep } = require('lodash');
const envVariableNameRegex = /^(?!\d)[\w-]*$/;
class Bru {

@@ -62,2 +64,9 @@ constructor(envVariables, collectionVariables, processEnvVars, collectionPath) {

if (envVariableNameRegex.test(key) === false) {
throw new Error(
`Variable name: "${key}" contains invalid characters!` +
' Names must only contain alpha-numeric characters, "-", "_" and cannot start with a digit.'
);
}
this.collectionVariables[key] = value;

@@ -67,2 +76,9 @@ }

getVar(key) {
if (envVariableNameRegex.test(key) === false) {
throw new Error(
`Variable name: "${key}" contains invalid characters!` +
' Names must only contain alpha-numeric characters and cannot start with a digit.'
);
}
return this.collectionVariables[key];

@@ -69,0 +85,0 @@ }

@@ -29,2 +29,3 @@ const { NodeVM } = require('vm2');

const CryptoJS = require('crypto-js');
const NodeVault = require('node-vault');

@@ -50,2 +51,7 @@ class ScriptRuntime {

const moduleWhitelist = get(scriptingConfig, 'moduleWhitelist', []);
const additionalContextRoots = get(scriptingConfig, 'additionalContextRoots', []);
const additionalContextRootsAbsolute = lodash
.chain(additionalContextRoots)
.map((acr) => (acr.startsWith('/') ? acr : path.join(collectionPath, acr)))
.value();

@@ -88,3 +94,3 @@ const whitelistedModules = {};

external: true,
root: [collectionPath],
root: [collectionPath, ...additionalContextRootsAbsolute],
mock: {

@@ -113,3 +119,4 @@ // node libs

...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined
fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
}

@@ -203,3 +210,4 @@ }

...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined
fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
}

@@ -206,0 +214,0 @@ }

@@ -31,2 +31,3 @@ const { NodeVM } = require('vm2');

const CryptoJS = require('crypto-js');
const NodeVault = require('node-vault');

@@ -52,2 +53,7 @@ class TestRuntime {

const moduleWhitelist = get(scriptingConfig, 'moduleWhitelist', []);
const additionalContextRoots = get(scriptingConfig, 'additionalContextRoots', []);
const additionalContextRootsAbsolute = lodash
.chain(additionalContextRoots)
.map((acr) => (acr.startsWith('/') ? acr : path.join(collectionPath, acr)))
.value();

@@ -106,3 +112,3 @@ const whitelistedModules = {};

external: true,
root: [collectionPath],
root: [collectionPath, ...additionalContextRootsAbsolute],
mock: {

@@ -131,3 +137,4 @@ // node libs

...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined
fs: allowScriptFilesystemAccess ? fs : undefined,
'node-vault': NodeVault
}

@@ -134,0 +141,0 @@ }

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