Merge pull request #22222 from cysp/fastify-scoped-rate-limit · MrsRobbot/codeql@9c5cd36 · GitHub
Skip to content

Commit 9c5cd36

Browse files
authored
Merge pull request github#22222 from cysp/fastify-scoped-rate-limit
JS: Recognize @fastify/rate-limit as a rate limiter
2 parents d1fed84 + c644854 commit 9c5cd36

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

‎javascript/ql/lib/semmle/javascript/security/dataflow/MissingRateLimiting.qll‎

Lines changed: 3 additions & 1 deletion
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* The `js/missing-rate-limiting` query now recognizes the `@fastify/rate-limit` package as a rate limiter.

‎javascript/ql/test/query-tests/Security/CWE-770/MissingRateLimit/MissingRateLimiting.expected‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
| tst.js:64:25:64:63 | functio ... req); } | This route handler performs $@, but is not rate-limited. | tst.js:64:46:64:60 | verifyUser(req) | authorization |
1010
| tst.js:76:25:76:53 | catchAs ... ndler1) | This route handler performs $@, but is not rate-limited. | tst.js:14:40:14:46 | login() | authorization |
1111
| tst.js:88:24:88:40 | expensiveHandler1 | This route handler performs $@, but is not rate-limited. | tst.js:14:40:14:46 | login() | authorization |
12-
| tst.js:112:28:112:44 | expensiveHandler1 | This route handler performs $@, but is not rate-limited. | tst.js:14:40:14:46 | login() | authorization |
12+
| tst.js:111:28:111:44 | expensiveHandler1 | This route handler performs $@, but is not rate-limited. | tst.js:14:40:14:46 | login() | authorization |
13+
| tst.js:116:39:116:55 | expensiveHandler1 | This route handler performs $@, but is not rate-limited. | tst.js:14:40:14:46 | login() | authorization |

‎javascript/ql/test/query-tests/Security/CWE-770/MissingRateLimit/tst.js‎

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)