
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@krakenjs/subprocess-robot
Advanced tools
Create processes, process pools, and message between processes
Create subprocesses and deal with messaging. Good for delegating tasks to a differnet process
Before:
import { slowSynchronousTask } from "./synchronous-tasks";
export function synchronousTask(options) {
return slowSynchronousTask(options);
}
After:
import { spawnProcess } from "subprocess-robot";
export async function asynchronousTask(options) {
const { slowSynchronousTask } = await spawnProcess.import(
require.resolve("./synchronous-tasks")
);
return await slowSynchronousTask(options);
}
Before:
import { slowSynchronousTask } from "./synchronous-tasks";
export function synchronousTask(options) {
return slowSynchronousTask(options);
}
After:
import { spawnProcessPool } from "subprocess-robot";
export async function asynchronousTask(options) {
const { slowSynchronousTask } = await spawnProcessPool.import(
require.resolve("./synchronous-tasks")
);
return await slowSynchronousTask(options);
}
Parent process:
import { spawnProcess } from 'subprocess-robot';
const childProcess = spawnProcess({
script: require.resolve('./child')
});
childProcess.on('getUser', ({ id ) => {
return {
id,
name: 'Daniel',
logout() {
// log the user out
}
}
});
Child process:
import { attachProcess } from "subprocess-robot";
const parentProcess = attachProcess();
let user = await parentProcess.send("getUser", { id: 1337 });
console.log(`Logging ${user.name} out`);
await user.logout();
Parent process:
import { spawnProcessPool } from "subprocess-robot";
const childProcessPool = spawnProcessPool({
script: require.resolve("./child"),
});
let result = childProcessPool.send("do_some_blocking_task", data);
Child process:
import { attachProcess } from "subprocess-robot";
const parentProcess = attachProcess();
parentProcess.on("do_some_blocking_task", (data) => {
return slowSynchronousCompile(data);
});
Parent process:
import { spawnProcessPool } from "subprocess-robot";
const childProcessPool = spawnProcessPool();
let { doSomeBlockingTask } = await childProcessPool.import(
require.resolve("./blockingTask")
);
let result = await doSomeBlockingTask(config);
Child process:
export function doSomeBlockingTask(config) {
return slowSynchronousCompile(config);
}
npm install --save subprocess-robot
Run the tests:
npm test
FAQs
Create processes, process pools, and message between processes
We found that @krakenjs/subprocess-robot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.