
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
childprocess
Advanced tools
Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.
Inject script into multiple process when using child_process.fork.
One of the use case is Multiple Process Code Coverage with istanbul.
$ npm i childprocess
require('childprocess').inject(function(modulePath, args, opt) {
const execFile = 'path/to/istanbul';
const cwd = opt.cwd && process.cwd();
const execArgs = [
'cover',
'--root', cwd,
'--dir', path.join(cwd, './coverage'),
'--report', 'none',
'--print', 'none',
'--include-pid',
modulePath,
'--',
].concat(args);
return [execFile, execArgs, opt];
});
require('child_process').fork();
Inject script when using child_process.fork.
The inject script is a function that running in sandbox in every process. that mean you can't use the variable out of the function.
The function should return an array that contains 3 arguments same as fork.
childprocess.inject(function(modulePath, args, opt) {
return [modulePath, args, opt];
});
Use child_process.fork without injected script.
FAQs
Wrap `child_process` module to support Multiple Process Code Coverage with istanbul.
We found that childprocess demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.