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.
caco-express
Advanced tools
Express middleware wrapper for caco generator function.
npm install caco-express
This is a caco version of co-express,
which supports 'yielding' callback functions using next(err, val)
.
Calling next()
without argument, passes control to the next middleware stack.
var express = require('express')
var wrap = require('caco-express')
var fs = require('fs')
var app = express()
app.get('/foo', wrap(function * (req, res, next) {
// yield callback function using caco next(err, val)
req.data = yield fs.readFile('./data.json', 'utf8', next)
yield setTimeout(next, 10)
next() // calling next() passes to next middleware
}, function * (req, res) {
res.send(data)
}))
// 4 arguments for error handling middleware
app.use(wrap(function * (err, req, res, next) {
res.status(500).send({
success: false,
message: err.message
})
}))
MIT
FAQs
Express middleware wrapper using caco generator function
We found that caco-express 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.