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 {
477477 private class ImmutableArrayTransformStep extends TaintTracking:: SharedTaintStep {
478478 override predicate heapStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
479479 exists ( DataFlow:: MethodCallNode call |
480- call .getMethodName ( ) in [ "toSorted" , "toReversed" ] and
480+ call .getMethodName ( ) in [ "toSorted" , "toReversed" , "with" ] and
481481 pred = call .getReceiver ( ) and
482482 succ = call
483483 )
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ typeInferenceMismatch
244244| tst.js:2:13:2:20 | source() | tst.js:66:10:66:16 | xSorted |
245245| tst.js:2:13:2:20 | source() | tst.js:68:10:68:23 | x.toReversed() |
246246| 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 |
247249| xml.js:5:18:5:25 | source() | xml.js:8:14:8:17 | text |
248250| xml.js:12:17:12:24 | source() | xml.js:13:14:13:19 | result |
249251| 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() {
6969 const xReversed = x . toReversed ( ) ;
7070 sink ( xReversed ) // NOT OK
7171
72- sink ( x . with ( ) ) // NOT OK -- Should be flagged as a taint sink, but it is not
72+ sink ( x . with ( ) ) // NOT OK
7373 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
7575}
You can’t perform that action at this time.
0 commit comments