
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
api-rate-limit
Advanced tools
A simple rate limiting package to prevent brute force attacks and abuse by limiting the number of requests from a single IP address or user within a specified time period.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
AI-detected possible typosquat
Supply chain riskThere is a package with a similar name that is downloaded much more often.
Did you mean |
---|
hapi-rate-limit |
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
This is a Node.js middleware that implements api rate limiting to ip addressess.Here We can specify how many requests to be sent to server for a specific api.
npm i api-rate-limit
const rateLimit = require('api-rate-limit')
app.get('/api', rateLimit(10, 60000), (req, res) => {
// Your route handler logic here
res.send('Hello, world!');
});
In the above example, the rate limit is set to 10 requests per minute (time is in the format of milliseconds). If a user makes more than 10 requests within a minute, they will receive a 429 "Too Many Requests" error.
The middleware tracks the number of requests made by each IP address and ensures that the rate limit is not exceeded for any given IP address.
Creates a new rate limit middleware that limits the number of requests to maxRequests within the specified timeWindow.
-maxRequests: The maximum number of requests allowed within the time window. -timeWindow: The time window in milliseconds during which the requests are counted.
FAQs
A simple rate limiting package to prevent brute force attacks and abuse by limiting the number of requests from a single IP address or user within a specified time period.
The npm package api-rate-limit receives a total of 2 weekly downloads. As such, api-rate-limit popularity was classified as not popular.
We found that api-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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.