Skip to content

Commit 4778332

Browse files
committed
add test for https.createServer in DisablingCertificateValidation.ql
1 parent 13c0eff commit 4778332

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

javascript/ql/test/query-tests/Security/CWE-295/DisablingCertificateValidation.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
| tst.js:45:2:45:28 | rejectU ... !!false | Disabling certificate validation is strongly discouraged. |
1010
| tst.js:48:2:48:26 | rejectU ... : !true | Disabling certificate validation is strongly discouraged. |
1111
| tst.js:74:9:74:33 | rejectU ... : false | Disabling certificate validation is strongly discouraged. |
12+
| tst.js:80:5:80:29 | rejectU ... : false | Disabling certificate validation is strongly discouraged. |

javascript/ql/test/query-tests/Security/CWE-295/tst.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,8 @@ function getSomeunsafeOptions() {
7474
rejectUnauthorized: false // NOT OK
7575
}
7676
}
77-
new https.Agent(getSomeunsafeOptions());
77+
new https.Agent(getSomeunsafeOptions());
78+
79+
https.createServer({
80+
rejectUnauthorized: false // NOT OK
81+
});

0 commit comments

Comments
 (0)