isolated-vm
Advanced tools
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| const os = require('node:os'); | ||
| const fs = require('node:fs'); | ||
| const path = require('node:path'); | ||
| const { spawnSync } = require('node:child_process'); | ||
| const targetArgs = [ | ||
| '--strip', | ||
| '--no-napi', | ||
| '--target', | ||
| '22.22.0', | ||
| '--target', | ||
| '24.14.0', | ||
| ]; | ||
| if (process.platform === 'linux') { | ||
| targetArgs.push('--tag-libc'); | ||
| } | ||
| const env = { | ||
| ...process.env, | ||
| MAKEFLAGS: `-j${os.cpus().length}`, | ||
| }; | ||
| fs.rmSync(path.join(__dirname, '..', 'prebuilds'), { recursive: true, force: true }); | ||
| const prebuildifyCli = require.resolve('prebuildify/bin.js'); | ||
| const result = spawnSync(process.execPath, [prebuildifyCli, ...targetArgs], { stdio: 'inherit', env }); | ||
| if (result.error) { | ||
| throw result.error; | ||
| } | ||
| process.exit(result.status ?? 1); |
+1
-1
@@ -1,1 +0,1 @@ | ||
| module.exports = require('./out/isolated_vm').ivm; | ||
| module.exports = require('node-gyp-build')(__dirname).ivm; |
+5
-7
| { | ||
| "name": "isolated-vm", | ||
| "version": "6.0.2", | ||
| "version": "6.1.0", | ||
| "description": "Access to multiple isolates", | ||
@@ -11,3 +11,4 @@ "main": "isolated-vm.js", | ||
| "scripts": { | ||
| "install": "prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)", | ||
| "install": "node-gyp-build || node-gyp rebuild --release -j max", | ||
| "prebuild": "node scripts/run-prebuild.js", | ||
| "rebuild": "node-gyp rebuild --release -j max", | ||
@@ -18,11 +19,8 @@ "lint": "find src -name '*.cc' | xargs -n1 clang-tidy", | ||
| "dependencies": { | ||
| "prebuild-install": "^7.1.3" | ||
| "node-gyp-build": "^4.8.4" | ||
| }, | ||
| "devDependencies": { | ||
| "isolated-vm": ".", | ||
| "prebuild": "^13.0.1" | ||
| "prebuildify": "^6.0.1" | ||
| }, | ||
| "binary": { | ||
| "module_path": "out" | ||
| }, | ||
| "repository": { | ||
@@ -29,0 +27,0 @@ "type": "git", |
+4
-1
@@ -188,2 +188,5 @@ [](https://www.npmjs.com/package/isolated-vm) | ||
| *NOTE*: `snapshot` contains compiled machine code. That means you should not accept `snapshot` | ||
| payloads from a user, otherwise they may be able to run arbitrary code. | ||
| ##### `ivm.Isolate.createSnapshot(scripts, warmup_script)` | ||
@@ -753,3 +756,3 @@ * `scripts` *[array]* | ||
| and where the HTML, DOM, and other web specifications begin. You should be a security-focused | ||
| hacker, otherwise you will almost certain make a company-ending mistake. This is not a module for | ||
| hacker, otherwise you will almost certainly make a company-ending mistake. This is not a module for | ||
| the faint of heart. Turn back now! | ||
@@ -756,0 +759,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
12224844
2235.45%114
12.87%836
3.21%779
0.39%3
Infinity%16
433.33%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed