
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Figure out your caller (thanks to @substack).
// foo.js
var bar = require('bar');
// bar.js
var caller = require('caller');
console.log(caller()); // `/path/to/foo.js`
// foo.js
var bar = require('bar');
bar.doWork();
// bar.js
var caller = require('caller');
exports.doWork = function () {
console.log(caller()); // `/path/to/foo.js`
};
Caller also accepts a depth
argument for tracing back further (defaults to 1
).
// foo.js
var bar = require('bar');
bar.doWork();
// bar.js
var baz = require('baz');
exports.doWork = function () {
baz.doWork();
};
// baz.js
var caller = require('caller');
exports.doWork = function () {
console.log(caller(2)); // `/path/to/foo.js`
};
v1.1.0 (March 9, 2022)
The 'callsite' package provides a way to get detailed information about the call stack, including file paths, line numbers, and function names. It offers more detailed stack trace information compared to 'caller', which focuses on the immediate caller.
The 'stack-trace' package allows you to capture and manipulate stack traces in Node.js. It provides more comprehensive stack trace information and is useful for advanced debugging and error handling, whereas 'caller' is more lightweight and focused on identifying the immediate caller.
FAQs
@substack's caller.js as a module
The npm package caller receives a total of 162,628 weekly downloads. As such, caller popularity was classified as popular.
We found that caller 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.