rate-limiting-implementation
Implements rate limiting and throttling mechanisms to protect APIs from abuse and ensure fair resource usage.
Install this skill
Security score
The rate-limiting-implementation skill was audited on Feb 12, 2026 and we found 17 security issues across 2 threat categories, including 1 high-severity. Review the findings below before installing.
Categories Tested
Security Issues
Eval function call - arbitrary code execution
| 200 | const result = await this.redis.eval( |
Template literal with variable interpolation in command context
| 127 | console.log(`Rate limited. Retry after ${waitTime}ms`); |
Template literal with variable interpolation in command context
| 160 | const windowKey = `ratelimit:${key}`; |
Template literal with variable interpolation in command context
| 161 | const blockKey = `ratelimit:block:${key}`; |
Template literal with variable interpolation in command context
| 227 | await this.redis.del(`ratelimit:${key}`, `ratelimit:block:${key}`); |
Template literal with variable interpolation in command context
| 231 | const current = await this.redis.get(`ratelimit:${key}`); |
Template literal with variable interpolation in command context
| 243 | `user:${userId}`, |
Template literal with variable interpolation in command context
| 253 | throw new Error(`Rate limit exceeded. Retry after ${result.retryAfter}s`); |
Template literal with variable interpolation in command context
| 307 | message: `Rate limit exceeded. Retry after ${result.retryAfter} seconds.`, |
Template literal with variable interpolation in command context
| 358 | keyGenerator: (req) => `search:${req.ip}`, |
Template literal with variable interpolation in command context
| 366 | keyGenerator: (req) => `user:${req.user?.id || req.ip}` |
Template literal with variable interpolation in command context
| 544 | `${userId}:minute`, |
Template literal with variable interpolation in command context
| 550 | `${userId}:hour`, |
Template literal with variable interpolation in command context
| 556 | `${userId}:day`, |
External URL reference
| 689 | - [IETF Rate Limit Headers](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/) |
External URL reference
| 690 | - [Redis Rate Limiting Patterns](https://redis.io/docs/manual/patterns/rate-limiter/) |
External URL reference
| 691 | - [Token Bucket Algorithm](https://en.wikipedia.org/wiki/Token_bucket) |