Skip to content

Commit f43510c

Browse files
committed
Added support for paginate.
1 parent 63193fa commit f43510c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ module ClientRequest {
429429
GotUrlRequest() {
430430
exists(API::Node callee, API::Node got | this = callee.getACall() |
431431
got = getAGotInstance() and
432-
callee = [got, got.getMember(["stream", "get", "post", "put", "patch", "head", "delete"])]
432+
callee =
433+
[
434+
got,
435+
got.getMember(["stream", "get", "post", "put", "patch", "head", "delete", "paginate"])
436+
]
433437
)
434438
}
435439

javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ test_ClientRequest
100100
| tst.js:328:5:328:38 | got(und ... ptions) |
101101
| tst.js:329:5:329:45 | got(und ... {url})) |
102102
| tst.js:332:5:332:46 | got.ext ... ).get() |
103+
| tst.js:334:5:334:25 | got.pag ... rl, {}) |
103104
| tst.js:337:5:337:20 | jsonClient.get() |
104105
| tst.js:340:5:340:21 | jsonClient2.get() |
105106
test_getADataNode
@@ -265,6 +266,7 @@ test_getUrl
265266
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:40:329:42 | url |
266267
| tst.js:332:5:332:46 | got.ext ... ).get() | tst.js:336:41:336:43 | url |
267268
| tst.js:332:5:332:46 | got.ext ... ).get() | tst.js:339:42:339:44 | url |
269+
| tst.js:334:5:334:25 | got.pag ... rl, {}) | tst.js:334:18:334:20 | url |
268270
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:336:41:336:43 | url |
269271
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:339:42:339:44 | url |
270272
| tst.js:340:5:340:21 | jsonClient2.get() | tst.js:336:41:336:43 | url |
@@ -352,5 +354,6 @@ test_getAResponseDataNode
352354
| tst.js:328:5:328:38 | got(und ... ptions) | tst.js:328:5:328:38 | got(und ... ptions) | text | true |
353355
| tst.js:329:5:329:45 | got(und ... {url})) | tst.js:329:5:329:45 | got(und ... {url})) | text | true |
354356
| tst.js:332:5:332:46 | got.ext ... ).get() | tst.js:332:5:332:46 | got.ext ... ).get() | text | true |
357+
| tst.js:334:5:334:25 | got.pag ... rl, {}) | tst.js:334:5:334:25 | got.pag ... rl, {}) | text | true |
355358
| tst.js:337:5:337:20 | jsonClient.get() | tst.js:337:5:337:20 | jsonClient.get() | text | true |
356359
| tst.js:340:5:340:21 | jsonClient2.get() | tst.js:340:5:340:21 | jsonClient2.get() | text | true |

javascript/ql/test/library-tests/frameworks/ClientRequests/tst.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function gotTests(url){
331331
const options2 = new Options({url});
332332
got.extend(options2).extend(options).get();
333333

334-
got.paginate(url, {}); // not flagged
334+
got.paginate(url, {});
335335

336336
const jsonClient = got.extend({url: url});
337337
jsonClient.get();

0 commit comments

Comments
 (0)