
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
cov-rate-limit
Advanced tools
A lightweight Rate limiter middleware for Express and Koa. Use to limit repeated requests to public APIs.
$ npm install --save cov-rate-limit
const Koa = require('koa')
const RateLimit = require('cov-rate-limit')
const app = new Koa()
const rateLimiter = RateLimit({
type: 'koa',
max: 100,
duration: 1000 * 60 * 10,
key (ctx) {
return ctx.ip
}
})
app.use(rateLimiter)
RateLimit with redis
const express = require('express')
const RateLimit = require('cov-rate-limit')
const Redis = require('redis')
const redis = Redis.createClient()
const rateLimiter = RateLimit({
type: 'express',
max: 100,
duration: 1000 * 60 * 10, // 10 min
key (req) {
return req.ip
},
cache: redis
})
const app = express()
app.set('trust proxy', 1)
const data = {
data: {
message: '11111111'
},
list: Array.from({ length: 10000 }).map((t, i) => i)
}
app.get('/api1', rateLimiter, (req, res) => {
res.send(data)
})
{
type: 'koa' // 'express'
CacheKey: 'C0V_RATE:',
key (req) {
return req.ip
},
max: 500, // max requests within duration [500]
duration: 1000 * 60 * 15, // of limit in milliseconds [15 * 60 * 1000]
setHeader: true,
cache: redis // redis client [in memory cache]
endSender (req, res) {},
// endSender (ctx, next) {}
}
MIT © Awe
inspiration by express-rate-limit
FAQs
rate-limiting middleware for Express and Koa
We found that cov-rate-limit 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.