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.
Ware inspired, easily create your own middleware layer using generators via co.
Ware inspired, easily create your own middleware layer using generators via co.
var ware = require('..');
var w = ware()
.use(function *(next) {
this.x = 'hello';
yield next;
})
.use(function *(next) {
this.y = 'world';
yield next;
})
.use(function *(next) {
yield next;
});
w.run({}, {}, function *() {
console.log(this.x, this.y);
});
Print the arguments of input.
var ware = require('..');
var w = ware()
.use(function *(next) {
console.log(this.input); // 1, 2, 3
yield next;
});
w.run(1, 2, 3);
Handles error.
var ware = require('..');
var w = ware()
.use(function *(next) {
if ('42' != this.input[0].life) throw new Error();
yield next;
})
.use(function *(next) {
console.log('yes!');
})
.on('error', function (err) {
console.log('no!');
});
w.run({ life: '41' }); // "no!"
w.run({ life: '42' }); // "yes!"
Create a new list of middleware.
Push a middleware fn(GeneratorFunction) onto the list. If the middleware has an arity of one more than the input to run it's an error middleware.
Runs the middleware functions with input... and optionally calls callback.
MIT
FAQs
Ware inspired, easily create your own middleware layer using generators via co.
The npm package co-ware receives a total of 568 weekly downloads. As such, co-ware popularity was classified as not popular.
We found that co-ware 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.