Skip to content

Commit 49f5e89

Browse files
committed
update expected output for experimental query
1 parent 3cece50 commit 49f5e89

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

javascript/ql/test/experimental/Security/CWE-918/SSRF.expected

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,10 @@ nodes
1515
| check-path.js:19:13:19:43 | 'test.c ... tainted |
1616
| check-path.js:19:27:19:43 | req.query.tainted |
1717
| check-path.js:19:27:19:43 | req.query.tainted |
18-
| check-path.js:22:13:22:63 | 'test.c ... ainted) |
19-
| check-path.js:22:13:22:63 | 'test.c ... ainted) |
20-
| check-path.js:22:27:22:63 | encodeU ... ainted) |
21-
| check-path.js:22:46:22:62 | req.query.tainted |
22-
| check-path.js:22:46:22:62 | req.query.tainted |
2318
| check-path.js:23:13:23:45 | `/addre ... inted}` |
2419
| check-path.js:23:13:23:45 | `/addre ... inted}` |
2520
| check-path.js:23:27:23:43 | req.query.tainted |
2621
| check-path.js:23:27:23:43 | req.query.tainted |
27-
| check-path.js:24:13:24:65 | `/addre ... nted)}` |
28-
| check-path.js:24:13:24:65 | `/addre ... nted)}` |
29-
| check-path.js:24:27:24:63 | encodeU ... ainted) |
30-
| check-path.js:24:46:24:62 | req.query.tainted |
31-
| check-path.js:24:46:24:62 | req.query.tainted |
3222
| check-path.js:33:15:33:45 | 'test.c ... tainted |
3323
| check-path.js:33:15:33:45 | 'test.c ... tainted |
3424
| check-path.js:33:29:33:45 | req.query.tainted |
@@ -97,18 +87,10 @@ edges
9787
| check-path.js:19:27:19:43 | req.query.tainted | check-path.js:19:13:19:43 | 'test.c ... tainted |
9888
| check-path.js:19:27:19:43 | req.query.tainted | check-path.js:19:13:19:43 | 'test.c ... tainted |
9989
| check-path.js:19:27:19:43 | req.query.tainted | check-path.js:19:13:19:43 | 'test.c ... tainted |
100-
| check-path.js:22:27:22:63 | encodeU ... ainted) | check-path.js:22:13:22:63 | 'test.c ... ainted) |
101-
| check-path.js:22:27:22:63 | encodeU ... ainted) | check-path.js:22:13:22:63 | 'test.c ... ainted) |
102-
| check-path.js:22:46:22:62 | req.query.tainted | check-path.js:22:27:22:63 | encodeU ... ainted) |
103-
| check-path.js:22:46:22:62 | req.query.tainted | check-path.js:22:27:22:63 | encodeU ... ainted) |
10490
| check-path.js:23:27:23:43 | req.query.tainted | check-path.js:23:13:23:45 | `/addre ... inted}` |
10591
| check-path.js:23:27:23:43 | req.query.tainted | check-path.js:23:13:23:45 | `/addre ... inted}` |
10692
| check-path.js:23:27:23:43 | req.query.tainted | check-path.js:23:13:23:45 | `/addre ... inted}` |
10793
| check-path.js:23:27:23:43 | req.query.tainted | check-path.js:23:13:23:45 | `/addre ... inted}` |
108-
| check-path.js:24:27:24:63 | encodeU ... ainted) | check-path.js:24:13:24:65 | `/addre ... nted)}` |
109-
| check-path.js:24:27:24:63 | encodeU ... ainted) | check-path.js:24:13:24:65 | `/addre ... nted)}` |
110-
| check-path.js:24:46:24:62 | req.query.tainted | check-path.js:24:27:24:63 | encodeU ... ainted) |
111-
| check-path.js:24:46:24:62 | req.query.tainted | check-path.js:24:27:24:63 | encodeU ... ainted) |
11294
| check-path.js:33:29:33:45 | req.query.tainted | check-path.js:33:15:33:45 | 'test.c ... tainted |
11395
| check-path.js:33:29:33:45 | req.query.tainted | check-path.js:33:15:33:45 | 'test.c ... tainted |
11496
| check-path.js:33:29:33:45 | req.query.tainted | check-path.js:33:15:33:45 | 'test.c ... tainted |
@@ -167,9 +149,7 @@ edges
167149
| check-domain.js:26:15:26:27 | req.query.url | check-domain.js:26:15:26:27 | req.query.url | check-domain.js:26:15:26:27 | req.query.url | The URL of this request depends on a user-provided value. |
168150
| check-middleware.js:9:13:9:43 | "test.c ... tainted | check-middleware.js:9:27:9:43 | req.query.tainted | check-middleware.js:9:13:9:43 | "test.c ... tainted | The URL of this request depends on a user-provided value. |
169151
| check-path.js:19:13:19:43 | 'test.c ... tainted | check-path.js:19:27:19:43 | req.query.tainted | check-path.js:19:13:19:43 | 'test.c ... tainted | The URL of this request depends on a user-provided value. |
170-
| check-path.js:22:13:22:63 | 'test.c ... ainted) | check-path.js:22:46:22:62 | req.query.tainted | check-path.js:22:13:22:63 | 'test.c ... ainted) | The URL of this request depends on a user-provided value. |
171152
| check-path.js:23:13:23:45 | `/addre ... inted}` | check-path.js:23:27:23:43 | req.query.tainted | check-path.js:23:13:23:45 | `/addre ... inted}` | The URL of this request depends on a user-provided value. |
172-
| check-path.js:24:13:24:65 | `/addre ... nted)}` | check-path.js:24:46:24:62 | req.query.tainted | check-path.js:24:13:24:65 | `/addre ... nted)}` | The URL of this request depends on a user-provided value. |
173153
| check-path.js:33:15:33:45 | 'test.c ... tainted | check-path.js:33:29:33:45 | req.query.tainted | check-path.js:33:15:33:45 | 'test.c ... tainted | The URL of this request depends on a user-provided value. |
174154
| check-path.js:37:15:37:45 | 'test.c ... tainted | check-path.js:37:29:37:45 | req.query.tainted | check-path.js:37:15:37:45 | 'test.c ... tainted | The URL of this request depends on a user-provided value. |
175155
| check-path.js:45:13:45:44 | `${base ... inted}` | check-path.js:45:26:45:42 | req.query.tainted | check-path.js:45:13:45:44 | `${base ... inted}` | The URL of this request depends on a user-provided value. |

javascript/ql/test/experimental/Security/CWE-918/check-path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ app.get('/check-with-axios', req => {
1919
axios.get('test.com/' + req.query.tainted); // SSRF
2020
axios.get('test.com/' + Number(req.query.tainted)); // OK
2121
axios.get('test.com/' + req.user.id); // OK
22-
axios.get('test.com/' + encodeURIComponent(req.query.tainted)); // SSRF
22+
axios.get('test.com/' + encodeURIComponent(req.query.tainted)); // OK
2323
axios.get(`/addresses/${req.query.tainted}`); // SSRF
24-
axios.get(`/addresses/${encodeURIComponent(req.query.tainted)}`); // SSRF
24+
axios.get(`/addresses/${encodeURIComponent(req.query.tainted)}`); // OK
2525

2626
if (Number.isInteger(req.query.tainted)) {
2727
axios.get('test.com/' + req.query.tainted); // OK

0 commit comments

Comments
 (0)