
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
error-stack2
Advanced tools
Parse and manipulate error.stack
$ npm i error-stack
const parse = require('error-stack')
const {stack} = new Error('foo')
console.log(stack)
// Error: foo
// at repl:1:11
// at Script.runInThisContext (vm.js:123:20)
const parsed = parse(stack)
parsed.type // Error
parsed.message // foo
parsed.traces
// [
// {
// callee: undefined,
// source: 'repl',
// line: 1,
// col: 11
// },
// {
// callee: 'Script.runInThisContext',
// source: 'vm.js',
// line: 123,
// col: 20
// }
// ]
parsed
.filter(({callee}) => !!callee)
.format()
// Error: foo
// at Script.runInThisContext (vm.js:123:20)
string
Error type
string
The message used by Error constructor
Array<Trace>
interface Source {
// The source of the the callee
source: string
line?: number
col?: number
}
interface Trace extends Source{
callee: string
// Whether the callee is 'eval'
eval?: boolean
// The source location inside eval content
evalTrace: Source
}
Function
the same as the callback function of Array.prototype.filter(callback)
Filters the current traces
Format object parsed
FAQs
Parse and manipulate error.stack
The npm package error-stack2 receives a total of 568 weekly downloads. As such, error-stack2 popularity was classified as not popular.
We found that error-stack2 demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.