
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
tasks.promise
Advanced tools
一个用于处理大量异步任务的短小精悍库,支持并发数和重试次数的配置
npm install tasks.promise
const { runAll } = require('tasks.promise');
// 一个可能随机失败的 Promise
function getPromise(name) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (Math.random() > 0.4) {
resolve(`${name} success`);
} else {
reject(`${name} fail`);
}
}, Math.random() * 1000);
});
}
// 模拟:开发者需要提供一个返回 Promise 的函数
let tasks = [0, 1, 2, 3, 4, 5, 6].map((item) => {
return () => getPromise(item);
});
// 使用 tasks.promise
runAll(tasks, { maxConcurrent: 3, retry: 2 })
.then((values) => {
console.log('run done with succedd', values);
})
.catch((values) => {
console.log('run done with fail', values);
});
假设开发者提供了 20 个需要并发处理的任务,并且设置并发数为 5,重试次数为 3
整体流程
某个任务流程
FAQs
一个可以处理并发和重试的 promise 库
We found that tasks.promise 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.