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.
heapdump-sample
Advanced tools
Setup a sampling interval for heap snapshots. This adds content to the "samples" field of heap snapshots and allows for determining when objects where allocated.
This must be used in conjunction with --track-heap-objects
or the corresponding C++ call. Otherwise it will cause a segfault.
require('heapdump-sample').sample();
The module exports functions to start and stop object tracking for convenience.
heapdump_sample.startTrackingHeapObjects(bool_should_trace_allocation_stacks);
heapdump_sample.stopTrackingHeapObjects();
Tracing allocation stacks can be memory intensive, it should not be used indefinitely. For production purposes you should not run tracking at all times, instead turn it on temporarily when you are debugging behavior.
There is the ability to get data out of the samples in real time by providing an FD to work with.
require('heapdump-sample').sample(process.stdout.fd);
The sample will be available in the JSON representation of a heap snapshot (available via the heapdump module).
Use -r heapdump-sample/register
to get samples on an interval.
The interval defaults to 50 milliseconds, and can be changed by setting the NODE_HEAPDUMP_SAMPLE_RATE
environment variable.
FAQs
setup a sampling interval for heap snapshots
The npm package heapdump-sample receives a total of 0 weekly downloads. As such, heapdump-sample popularity was classified as not popular.
We found that heapdump-sample 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.
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.