Skip to content

LGTM.com - false positive rate limit #4000

@hongbo-miao

Description

@hongbo-miao

Description of the false positive

I wrapped rate limit middleware,

import rateLimit, { Options } from 'express-rate-limit';

const rateLimitOptions: Options = {
  windowMs: 60 * 1000, // 60 sec
  max: 100, // requests per IP
  message: 'Sorry, too many requests, please try again later.',
};
const rateLimitMiddleware = rateLimit(rateLimitOptions);

export default rateLimitMiddleware;

and use globally in the begging of the app by

app.use(rateLimitMiddleware);

However, LGTM.com still think it is not rate-limited.

URL to the alert on the project page on LGTM.com

https://lgtm.com/projects/g/Hongbo-Miao/hongbomiao.com/snapshot/0438d6b811a3ec91c5ac84e37658e74e380d63a4/files/server/src/index.ts?sort=name&dir=ASC&mode=heatmap#x4de7b73e10b2a75c:1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions