Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
leaked-handles
Advanced tools
Detect any handles leaked in node
require("leaked-handles");
no of handles 1
timer handle (`setTimeout(any, 1000)`)
timer handle leaked at one of:
at Test.t (/home/raynos/uber/leaked-handles/test/leak-timer.js:10:17)
timer listener function any() {}
no of handles 1
tcp handle leaked at one of:
at Test.t (/home/raynos/uber/leaked-handles/test/leak-tcp.js:9:22)
tcp stream { fd: 10,
readable: false,
writable: true,
address: { address: '127.0.0.1', family: 'IPv4', port: 39126 } }
require('leaked-handles').set({
fullStack: true, // use full stack traces
timeout: 30000, // run every 30 seconds instead of 5.
debugSockets: true // pretty print tcp thrown exceptions.
});
Add this to the TOP of your tests as the very first require.
This will now print any handles that keep your process open.
It has pretty printing of some handles including
When you see a timer, it will print the file, so go fix it!
When you see a child process it prints the pid. Run ps -p {pid}
and figure out what kind of child process it is.
When you see a stream it prints the fd. Run lsof -p {process.pid}
to see what fds your test process has open and see if you can
figure out what the hell it is.
When you see a child process stream, go find the child process
that leaked. If no child process leaked then again, use lsof
to lookup up the fd.
npm install leaked-handles
npm test
FAQs
Detect any handles leaked in node
The npm package leaked-handles receives a total of 15,947 weekly downloads. As such, leaked-handles popularity was classified as popular.
We found that leaked-handles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.