File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
javascript/ql/test/library-tests/TaintTracking Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ typeInferenceMismatch
171
171
| promise.js:5:25:5:32 | source() | promise.js:5:8:5:33 | bluebir ... urce()) |
172
172
| promise.js:10:24:10:31 | source() | promise.js:10:8:10:32 | Promise ... urce()) |
173
173
| promise.js:12:20:12:27 | source() | promise.js:13:8:13:23 | resolver.promise |
174
+ | refinement-sanitizer.js:19:17:19:24 | source() | refinement-sanitizer.js:33:10:33:21 | array.join() |
174
175
| rxjs.js:3:1:3:8 | source() | rxjs.js:10:14:10:17 | data |
175
176
| rxjs.js:13:1:13:8 | source() | rxjs.js:17:23:17:23 | x |
176
177
| rxjs.js:13:1:13:8 | source() | rxjs.js:18:23:18:23 | x |
Original file line number Diff line number Diff line change
1
+ import * as dummy from 'dummy' ;
2
+
3
+ function oneUse ( ) {
4
+ let taint = source ( ) ;
5
+
6
+ if ( ! isSafe ( taint ) ) {
7
+ return ;
8
+ }
9
+
10
+ let array = [ ] ;
11
+ if ( taint ) {
12
+ array . push ( taint ) ;
13
+ }
14
+
15
+ sink ( array . join ( ) ) ; // OK
16
+ }
17
+
18
+ function secondUse ( ) {
19
+ let taint = source ( ) ;
20
+
21
+ if ( ! isSafe ( taint ) ) {
22
+ return ;
23
+ }
24
+
25
+ let array = [ ] ;
26
+ if ( taint ) {
27
+ array . push ( taint ) ;
28
+ }
29
+ if ( taint ) {
30
+ array . push ( taint ) ;
31
+ }
32
+
33
+ sink ( array . join ( ) ) ; // OK
34
+ }
You can’t perform that action at this time.
0 commit comments