
Research
Security News
Malicious npm Package Wipes Codebases with Remote Trigger
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
interruptor
Advanced tools
Run a function with the possibility to interrupt it from another thread
import { runInterruptible, interrupt } from 'interruptor';
runInterruptible(handle => {
// pass handle to another thread using .postMessage();
while(true);
});
// In another thread:
interrupt(handle);
This is a native addon, and currently no pre-built binaries are available.
This only interrupts synchronous execution inside the callback, not async
functions (although the microtaskMode
option for the vm
module in
Node.js 14 and above can help with Promises here).
This will not fully interrupt the running code, and not run any catch
or
finally
blocks. In particular, if a module is being loaded at the time
of interruption, the incomplete module may remain in the module loader cache.
FAQs
Run a function with the possibility to interrupt it from another thread
The npm package interruptor receives a total of 35,360 weekly downloads. As such, interruptor popularity was classified as popular.
We found that interruptor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 33 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
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.
Security News
New CNA status enables OpenJS Foundation to assign CVEs for security vulnerabilities in projects like ESLint, Fastify, Electron, and others, while leaving disclosure responsibility with individual maintainers.