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.
const Qyu = require('qyu');
(async () => {
const q = new Qyu({concurrency: 3});
// Basic:
q(myAsyncFunction);
// Extra options:
q(myAsyncFunction, {priority: 7}, arg1, arg2 /*, ...*/));
// Doesn't matter if more jobs come around later,
// Qyu will queue them as necessary and optimally manage them all
// for you based on your concurrency setting
setTimeout(() => {
for (let i=0; i<10; i++) {
q(myAsyncFunction);
}
}, 2000);
await q.whenEmpty(); // When all tasks finished and queue is empty...
})();
qyu
is a general-purpose asynchronous job queue for Node.js. It's flexible and easy to use, and always accepting jobs and running them as fast as the concurrency settings dictates.
Qyu was meant for:
...
const
Qyu = require('qyu'),
axios = require('axios'),
cheerio = require('cheerio');
(async () => {
const siteUrl = 'http://www.store-to-crawl.com/products';
const q = new Qyu({concurrency: 3});
for (let i=1; i<=10; i++) {
q(async () => {
let resp = await axios(siteUrl+'?page='+i);
let $ = cheerio.load(resp.data);
let products = [];
$('.product-list .product').each((i, elem) => {
let $elem = $(elem);
let title = $elem.find('.title').text();
let price = $elem.find('.price').text();
products.push({ title, price });
});
// Do something with products...
});
}
await q.whenEmpty();
// All done!
})();
FAQs
A general-purpose asynchronous job queue for Node.js
The npm package qyu receives a total of 995 weekly downloads. As such, qyu popularity was classified as not popular.
We found that qyu 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.