Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ivm-inspect
Advanced tools
[![npm version](https://badgen.now.sh/npm/v/ivm-inspect)](https://www.npmjs.com/package/ivm-inspect) [![mit license](https://badgen.now.sh/npm/license/ivm-inspect)](https://github.com/laverdet/ivm-inspect/blob/master/LICENSE) [![npm downloads](https://bad
This is library meant to be used in conjunction with
isolated-vm
. It adds rudimentary console support for
the common case of outputting to a local console. I would guess it's probably pretty easy to crash
the process by passing whacky objects to these functions so use this at your own risk.
async create(isolate, context)
isolate
- An isolate created within isolated-vm
context
- A context{ formatWithOptions, inspect }
This returns an object with two named Reference
instances to the built-in nodejs functions
util.formatWithOptions
and util.inspect
. These
references belong to the isolate and maintain internal handles to the context. You can use these
functions in any context created within this isolate-- you do not need to call this once per
context.
async forwardConsole(context, util)
context
- A contextutil
- The return value of await create(...)
This function configures a context's console
to output directly to the process's stdout and
stderr.
const ivm = require('isolated-vm');
const ivmInspect = require('ivm-inspect');
(async() => {
const isolate = new ivm.Isolate;
const context = await isolate.createContext();
const util = await ivmInspect.create(isolate, context);
await ivmInspect.forwardConsole(context, util);
await context.eval('console.log("Here is an object: %O", { foo: "bar" })');
})().catch(console.error);
Wow!
FAQs
[![npm version](https://badgen.now.sh/npm/v/ivm-inspect)](https://www.npmjs.com/package/ivm-inspect) [![mit license](https://badgen.now.sh/npm/license/ivm-inspect)](https://github.com/laverdet/ivm-inspect/blob/master/LICENSE) [![npm downloads](https://bad
The npm package ivm-inspect receives a total of 9 weekly downloads. As such, ivm-inspect popularity was classified as not popular.
We found that ivm-inspect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.