Skip to content

Commit de5e6dd

Browse files
committed
JS: Update with changes in TaintTracking test
1 parent c204527 commit de5e6dd

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

javascript/ql/test/library-tests/TaintTracking/BasicTaintTracking.expected

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ legacyDataFlowDifference
3535
| spread.js:4:15:4:22 | source() | spread.js:18:8:18:8 | y | only flow with NEW data flow library |
3636
| spread.js:4:15:4:22 | source() | spread.js:24:8:24:8 | y | only flow with NEW data flow library |
3737
| tst.js:2:13:2:20 | source() | tst.js:17:10:17:10 | a | only flow with OLD data flow library |
38+
| tst.js:82:23:82:30 | source() | tst.js:83:58:83:61 | item | only flow with OLD data flow library |
39+
| tst.js:82:23:82:30 | source() | tst.js:84:14:84:20 | grouped | only flow with OLD data flow library |
3840
| use-use-after-implicit-read.js:7:17:7:24 | source() | use-use-after-implicit-read.js:15:10:15:10 | x | only flow with NEW data flow library |
3941
consistencyIssue
4042
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
@@ -273,6 +275,10 @@ flow
273275
| static-capture-groups.js:2:17:2:24 | source() | static-capture-groups.js:27:14:27:22 | RegExp.$1 |
274276
| static-capture-groups.js:32:17:32:24 | source() | static-capture-groups.js:38:10:38:18 | RegExp.$1 |
275277
| static-capture-groups.js:42:12:42:19 | source() | static-capture-groups.js:43:14:43:22 | RegExp.$1 |
278+
| string-immutable-operations.js:2:13:2:20 | source() | string-immutable-operations.js:3:10:3:25 | x.toWellFormed() |
279+
| string-immutable-operations.js:2:13:2:20 | source() | string-immutable-operations.js:6:10:6:20 | wellFormedX |
280+
| string-immutable-operations.js:2:13:2:20 | source() | string-immutable-operations.js:9:10:9:26 | concatWellFormedX |
281+
| string-immutable-operations.js:11:10:11:17 | source() | string-immutable-operations.js:11:10:11:32 | source( ... ormed() |
276282
| string-replace.js:3:13:3:20 | source() | string-replace.js:14:10:14:13 | data |
277283
| string-replace.js:3:13:3:20 | source() | string-replace.js:18:10:18:13 | data |
278284
| string-replace.js:3:13:3:20 | source() | string-replace.js:21:6:21:41 | safe(). ... taint) |
@@ -307,8 +313,17 @@ flow
307313
| tst.js:2:13:2:20 | source() | tst.js:66:10:66:16 | xSorted |
308314
| tst.js:2:13:2:20 | source() | tst.js:68:10:68:23 | x.toReversed() |
309315
| tst.js:2:13:2:20 | source() | tst.js:70:10:70:18 | xReversed |
310-
| tst.js:2:13:2:20 | source() | tst.js:72:10:72:17 | x.with() |
311-
| tst.js:2:13:2:20 | source() | tst.js:74:10:74:14 | xWith |
316+
| tst.js:2:13:2:20 | source() | tst.js:72:10:72:31 | Map.gro ... z => z) |
317+
| tst.js:2:13:2:20 | source() | tst.js:74:10:74:34 | Object. ... z => z) |
318+
| tst.js:2:13:2:20 | source() | tst.js:78:55:78:58 | item |
319+
| tst.js:2:13:2:20 | source() | tst.js:79:14:79:20 | grouped |
320+
| tst.js:2:13:2:20 | source() | tst.js:100:10:100:17 | x.with() |
321+
| tst.js:2:13:2:20 | source() | tst.js:102:10:102:14 | xWith |
322+
| tst.js:75:22:75:29 | source() | tst.js:75:10:75:52 | Map.gro ... (item)) |
323+
| tst.js:75:22:75:29 | source() | tst.js:75:47:75:50 | item |
324+
| tst.js:87:22:87:29 | source() | tst.js:90:14:90:25 | taintedValue |
325+
| tst.js:93:22:93:29 | source() | tst.js:96:14:96:25 | taintedValue |
326+
| tst.js:93:22:93:29 | source() | tst.js:97:14:97:26 | map.get(true) |
312327
| use-use-after-implicit-read.js:7:17:7:24 | source() | use-use-after-implicit-read.js:8:10:8:17 | captured |
313328
| use-use-after-implicit-read.js:7:17:7:24 | source() | use-use-after-implicit-read.js:15:10:15:10 | x |
314329
| xml.js:5:18:5:25 | source() | xml.js:8:14:8:17 | text |

javascript/ql/test/library-tests/TaintTracking/DataFlowTracking.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,6 @@ flow
190190
| tst.js:2:13:2:20 | source() | tst.js:35:14:35:16 | ary |
191191
| tst.js:2:13:2:20 | source() | tst.js:41:14:41:16 | ary |
192192
| tst.js:2:13:2:20 | source() | tst.js:54:14:54:19 | unsafe |
193+
| tst.js:93:22:93:29 | source() | tst.js:96:14:96:25 | taintedValue |
194+
| tst.js:93:22:93:29 | source() | tst.js:97:14:97:26 | map.get(true) |
193195
| use-use-after-implicit-read.js:7:17:7:24 | source() | use-use-after-implicit-read.js:15:10:15:10 | x |

javascript/ql/test/library-tests/TaintTracking/tst.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function test() {
8080
}
8181
{
8282
const list = [source()];
83-
const grouped = Map.groupBy(list, (item) => sink(item)); // NOT OK
84-
sink(grouped); // NOT OK
83+
const grouped = Map.groupBy(list, (item) => sink(item)); // NOT OK [INCONSISTENCY]
84+
sink(grouped); // NOT OK [INCONSISTENCY]
8585
}
8686
{
8787
const data = source();

0 commit comments

Comments
 (0)