File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
test/library-tests/TaintTracking Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -477,7 +477,7 @@ private module ArrayLibraries {
477
477
private class ImmutableArrayTransformStep extends TaintTracking:: SharedTaintStep {
478
478
override predicate heapStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
479
479
exists ( DataFlow:: MethodCallNode call |
480
- call .getMethodName ( ) in [ "toSorted" , "toReversed" ] and
480
+ call .getMethodName ( ) in [ "toSorted" , "toReversed" , "with" ] and
481
481
pred = call .getReceiver ( ) and
482
482
succ = call
483
483
)
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ typeInferenceMismatch
244
244
| tst.js:2:13:2:20 | source() | tst.js:66:10:66:16 | xSorted |
245
245
| tst.js:2:13:2:20 | source() | tst.js:68:10:68:23 | x.toReversed() |
246
246
| tst.js:2:13:2:20 | source() | tst.js:70:10:70:18 | xReversed |
247
+ | tst.js:2:13:2:20 | source() | tst.js:72:10:72:17 | x.with() |
248
+ | tst.js:2:13:2:20 | source() | tst.js:74:10:74:14 | xWith |
247
249
| xml.js:5:18:5:25 | source() | xml.js:8:14:8:17 | text |
248
250
| xml.js:12:17:12:24 | source() | xml.js:13:14:13:19 | result |
249
251
| xml.js:23:18:23:25 | source() | xml.js:20:14:20:17 | attr |
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ function test() {
69
69
const xReversed = x . toReversed ( ) ;
70
70
sink ( xReversed ) // NOT OK
71
71
72
- sink ( x . with ( ) ) // NOT OK -- Should be flagged as a taint sink, but it is not
72
+ sink ( x . with ( ) ) // NOT OK
73
73
const xWith = x . with ( ) ;
74
- sink ( xWith ) // NOT OK -- Should be flagged as a taint sink, but it is not
74
+ sink ( xWith ) // NOT OK
75
75
}
You can’t perform that action at this time.
0 commit comments