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.
denial-stream
Advanced tools
Prevent unpiping on error in stream
var denialStream = require('denial-stream')
var from = require('from2')
var through = require('through2')
var dataStream = from.obj([1, 2, 3, 4, 5, 6, 7])
var failStream = through.obj(function(chunk, enc, callback) {
if (chunk % 2) return callback(new Error('not cool'))
this.push(chunk + '')
callback()
})
// Errors are still emitted from original stream
failStream.on('error', function (err) {
console.log(err)
})
dataStream
// No error events will be emitted from denialStream
.pipe(denialStream(failStream))
.pipe(process.stdout)
Wraps a readable/writable stream in a new stream
The deniedError
event is emitted when the passed in stream emits an error. deniedStream
suppresses normal error
events to prevent the stream from unpiping
and instead forwards errors with the deniedError
event.
MIT
FAQs
Prevent unpiping on error in stream
We found that denial-stream 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.