Skip to content

Commit c0085cb

Browse files
fix expected output for Taint.ql
1 parent f0d9dab commit c0085cb

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

swift/ql/test/library-tests/dataflow/taint/Taint.expected

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
edges
2+
| data.swift:24:5:24:29 | [summary param] 0 in init(_:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(_:) : |
23
| data.swift:25:2:25:66 | [summary param] 0 in init(base64Encoded:options:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(base64Encoded:options:) : |
34
| data.swift:26:2:26:61 | [summary param] 0 in init(buffer:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(buffer:) : |
45
| data.swift:27:2:27:62 | [summary param] 0 in init(buffer:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(buffer:) : |
@@ -34,6 +35,14 @@ edges
3435
| data.swift:62:2:62:58 | [summary param] this in shuffled(using:) : | file://:0:0:0:0 | [summary] to write: return (return) in shuffled(using:) : |
3536
| data.swift:63:2:63:123 | [summary param] this in trimmingPrefix(_:) : | file://:0:0:0:0 | [summary] to write: return (return) in trimmingPrefix(_:) : |
3637
| data.swift:64:2:64:72 | [summary param] this in trimmingPrefix(while:) : | file://:0:0:0:0 | [summary] to write: return (return) in trimmingPrefix(while:) : |
38+
| data.swift:81:20:81:51 | call to init(_:) : | data.swift:82:26:82:26 | dataTainted : |
39+
| data.swift:81:20:81:51 | call to init(_:) : | data.swift:85:12:85:12 | dataTainted |
40+
| data.swift:81:25:81:47 | .utf8 : | data.swift:24:5:24:29 | [summary param] 0 in init(_:) : |
41+
| data.swift:81:25:81:47 | .utf8 : | data.swift:81:20:81:51 | call to init(_:) : |
42+
| data.swift:81:26:81:33 | call to source() : | data.swift:81:25:81:47 | .utf8 : |
43+
| data.swift:82:21:82:37 | call to init(_:) : | data.swift:86:12:86:12 | dataTainted2 |
44+
| data.swift:82:26:82:26 | dataTainted : | data.swift:24:5:24:29 | [summary param] 0 in init(_:) : |
45+
| data.swift:82:26:82:26 | dataTainted : | data.swift:82:21:82:37 | call to init(_:) : |
3746
| data.swift:89:21:89:71 | call to init(base64Encoded:options:) : | data.swift:90:12:90:12 | dataTainted3 |
3847
| data.swift:89:41:89:48 | call to source() : | data.swift:25:2:25:66 | [summary param] 0 in init(base64Encoded:options:) : |
3948
| data.swift:89:41:89:48 | call to source() : | data.swift:89:21:89:71 | call to init(base64Encoded:options:) : |
@@ -303,9 +312,9 @@ edges
303312
| string.swift:28:17:28:25 | call to source2() : | string.swift:39:13:39:29 | ... .+(_:_:) ... |
304313
| string.swift:74:17:74:25 | call to source2() : | string.swift:85:13:85:21 | .description |
305314
| string.swift:74:17:74:25 | call to source2() : | string.swift:88:13:88:21 | .debugDescription |
306-
| string.swift:97:17:97:25 | call to source2() : | string.swift:102:13:102:13 | tainted |
307-
| string.swift:98:24:98:32 | call to source2() : | string.swift:103:13:103:13 | taintedCString |
308-
| string.swift:99:31:99:39 | call to source2() : | string.swift:104:13:104:13 | taintedUnicodeScalars |
315+
| string.swift:121:17:121:25 | call to source2() : | string.swift:126:13:126:13 | tainted |
316+
| string.swift:122:24:122:32 | call to source2() : | string.swift:127:13:127:13 | taintedCString |
317+
| string.swift:123:31:123:39 | call to source2() : | string.swift:128:13:128:13 | taintedUnicodeScalars |
309318
| subscript.swift:13:15:13:22 | call to source() : | subscript.swift:13:15:13:25 | ...[...] |
310319
| subscript.swift:14:15:14:23 | call to source2() : | subscript.swift:14:15:14:26 | ...[...] |
311320
| try.swift:9:17:9:24 | call to source() : | try.swift:9:13:9:24 | try ... |
@@ -546,6 +555,7 @@ edges
546555
| webview.swift:137:34:137:41 | call to source() : | webview.swift:66:5:66:126 | [summary param] 0 in init(source:injectionTime:forMainFrameOnly:in:) : |
547556
| webview.swift:137:34:137:41 | call to source() : | webview.swift:137:13:137:113 | call to init(source:injectionTime:forMainFrameOnly:in:) : |
548557
nodes
558+
| data.swift:24:5:24:29 | [summary param] 0 in init(_:) : | semmle.label | [summary param] 0 in init(_:) : |
549559
| data.swift:25:2:25:66 | [summary param] 0 in init(base64Encoded:options:) : | semmle.label | [summary param] 0 in init(base64Encoded:options:) : |
550560
| data.swift:26:2:26:61 | [summary param] 0 in init(buffer:) : | semmle.label | [summary param] 0 in init(buffer:) : |
551561
| data.swift:27:2:27:62 | [summary param] 0 in init(buffer:) : | semmle.label | [summary param] 0 in init(buffer:) : |
@@ -581,6 +591,13 @@ nodes
581591
| data.swift:62:2:62:58 | [summary param] this in shuffled(using:) : | semmle.label | [summary param] this in shuffled(using:) : |
582592
| data.swift:63:2:63:123 | [summary param] this in trimmingPrefix(_:) : | semmle.label | [summary param] this in trimmingPrefix(_:) : |
583593
| data.swift:64:2:64:72 | [summary param] this in trimmingPrefix(while:) : | semmle.label | [summary param] this in trimmingPrefix(while:) : |
594+
| data.swift:81:20:81:51 | call to init(_:) : | semmle.label | call to init(_:) : |
595+
| data.swift:81:25:81:47 | .utf8 : | semmle.label | .utf8 : |
596+
| data.swift:81:26:81:33 | call to source() : | semmle.label | call to source() : |
597+
| data.swift:82:21:82:37 | call to init(_:) : | semmle.label | call to init(_:) : |
598+
| data.swift:82:26:82:26 | dataTainted : | semmle.label | dataTainted : |
599+
| data.swift:85:12:85:12 | dataTainted | semmle.label | dataTainted |
600+
| data.swift:86:12:86:12 | dataTainted2 | semmle.label | dataTainted2 |
584601
| data.swift:89:21:89:71 | call to init(base64Encoded:options:) : | semmle.label | call to init(base64Encoded:options:) : |
585602
| data.swift:89:41:89:48 | call to source() : | semmle.label | call to source() : |
586603
| data.swift:90:12:90:12 | dataTainted3 | semmle.label | dataTainted3 |
@@ -739,6 +756,7 @@ nodes
739756
| file://:0:0:0:0 | [summary] to write: return (return) in flatMap(_:) : | semmle.label | [summary] to write: return (return) in flatMap(_:) : |
740757
| file://:0:0:0:0 | [summary] to write: return (return) in flatMap(_:) : | semmle.label | [summary] to write: return (return) in flatMap(_:) : |
741758
| file://:0:0:0:0 | [summary] to write: return (return) in forProperty(_:) : | semmle.label | [summary] to write: return (return) in forProperty(_:) : |
759+
| file://:0:0:0:0 | [summary] to write: return (return) in init(_:) : | semmle.label | [summary] to write: return (return) in init(_:) : |
742760
| file://:0:0:0:0 | [summary] to write: return (return) in init(base64Encoded:options:) : | semmle.label | [summary] to write: return (return) in init(base64Encoded:options:) : |
743761
| file://:0:0:0:0 | [summary] to write: return (return) in init(base64Encoded:options:) : | semmle.label | [summary] to write: return (return) in init(base64Encoded:options:) : |
744762
| file://:0:0:0:0 | [summary] to write: return (return) in init(base64Encoded:options:) : | semmle.label | [summary] to write: return (return) in init(base64Encoded:options:) : |
@@ -948,12 +966,12 @@ nodes
948966
| string.swift:74:17:74:25 | call to source2() : | semmle.label | call to source2() : |
949967
| string.swift:85:13:85:21 | .description | semmle.label | .description |
950968
| string.swift:88:13:88:21 | .debugDescription | semmle.label | .debugDescription |
951-
| string.swift:97:17:97:25 | call to source2() : | semmle.label | call to source2() : |
952-
| string.swift:98:24:98:32 | call to source2() : | semmle.label | call to source2() : |
953-
| string.swift:99:31:99:39 | call to source2() : | semmle.label | call to source2() : |
954-
| string.swift:102:13:102:13 | tainted | semmle.label | tainted |
955-
| string.swift:103:13:103:13 | taintedCString | semmle.label | taintedCString |
956-
| string.swift:104:13:104:13 | taintedUnicodeScalars | semmle.label | taintedUnicodeScalars |
969+
| string.swift:121:17:121:25 | call to source2() : | semmle.label | call to source2() : |
970+
| string.swift:122:24:122:32 | call to source2() : | semmle.label | call to source2() : |
971+
| string.swift:123:31:123:39 | call to source2() : | semmle.label | call to source2() : |
972+
| string.swift:126:13:126:13 | tainted | semmle.label | tainted |
973+
| string.swift:127:13:127:13 | taintedCString | semmle.label | taintedCString |
974+
| string.swift:128:13:128:13 | taintedUnicodeScalars | semmle.label | taintedUnicodeScalars |
957975
| subscript.swift:13:15:13:22 | call to source() : | semmle.label | call to source() : |
958976
| subscript.swift:13:15:13:25 | ...[...] | semmle.label | ...[...] |
959977
| subscript.swift:14:15:14:23 | call to source2() : | semmle.label | call to source2() : |
@@ -1153,6 +1171,8 @@ nodes
11531171
| webview.swift:138:10:138:10 | c | semmle.label | c |
11541172
| webview.swift:139:10:139:12 | .source | semmle.label | .source |
11551173
subpaths
1174+
| data.swift:81:25:81:47 | .utf8 : | data.swift:24:5:24:29 | [summary param] 0 in init(_:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(_:) : | data.swift:81:20:81:51 | call to init(_:) : |
1175+
| data.swift:82:26:82:26 | dataTainted : | data.swift:24:5:24:29 | [summary param] 0 in init(_:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(_:) : | data.swift:82:21:82:37 | call to init(_:) : |
11561176
| data.swift:89:41:89:48 | call to source() : | data.swift:25:2:25:66 | [summary param] 0 in init(base64Encoded:options:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(base64Encoded:options:) : | data.swift:89:21:89:71 | call to init(base64Encoded:options:) : |
11571177
| data.swift:93:34:93:41 | call to source() : | data.swift:26:2:26:61 | [summary param] 0 in init(buffer:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(buffer:) : | data.swift:93:21:93:73 | call to init(buffer:) : |
11581178
| data.swift:95:34:95:41 | call to source() : | data.swift:27:2:27:62 | [summary param] 0 in init(buffer:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(buffer:) : | data.swift:95:21:95:74 | call to init(buffer:) : |
@@ -1274,6 +1294,8 @@ subpaths
12741294
| webview.swift:132:34:132:41 | call to source() : | webview.swift:65:5:65:93 | [summary param] 0 in init(source:injectionTime:forMainFrameOnly:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(source:injectionTime:forMainFrameOnly:) : | webview.swift:132:13:132:102 | call to init(source:injectionTime:forMainFrameOnly:) : |
12751295
| webview.swift:137:34:137:41 | call to source() : | webview.swift:66:5:66:126 | [summary param] 0 in init(source:injectionTime:forMainFrameOnly:in:) : | file://:0:0:0:0 | [summary] to write: return (return) in init(source:injectionTime:forMainFrameOnly:in:) : | webview.swift:137:13:137:113 | call to init(source:injectionTime:forMainFrameOnly:in:) : |
12761296
#select
1297+
| data.swift:85:12:85:12 | dataTainted | data.swift:81:26:81:33 | call to source() : | data.swift:85:12:85:12 | dataTainted | result |
1298+
| data.swift:86:12:86:12 | dataTainted2 | data.swift:81:26:81:33 | call to source() : | data.swift:86:12:86:12 | dataTainted2 | result |
12771299
| data.swift:90:12:90:12 | dataTainted3 | data.swift:89:41:89:48 | call to source() : | data.swift:90:12:90:12 | dataTainted3 | result |
12781300
| data.swift:94:12:94:12 | dataTainted4 | data.swift:93:34:93:41 | call to source() : | data.swift:94:12:94:12 | dataTainted4 | result |
12791301
| data.swift:96:12:96:12 | dataTainted5 | data.swift:95:34:95:41 | call to source() : | data.swift:96:12:96:12 | dataTainted5 | result |
@@ -1356,9 +1378,9 @@ subpaths
13561378
| string.swift:39:13:39:29 | ... .+(_:_:) ... | string.swift:28:17:28:25 | call to source2() : | string.swift:39:13:39:29 | ... .+(_:_:) ... | result |
13571379
| string.swift:85:13:85:21 | .description | string.swift:74:17:74:25 | call to source2() : | string.swift:85:13:85:21 | .description | result |
13581380
| string.swift:88:13:88:21 | .debugDescription | string.swift:74:17:74:25 | call to source2() : | string.swift:88:13:88:21 | .debugDescription | result |
1359-
| string.swift:102:13:102:13 | tainted | string.swift:97:17:97:25 | call to source2() : | string.swift:102:13:102:13 | tainted | result |
1360-
| string.swift:103:13:103:13 | taintedCString | string.swift:98:24:98:32 | call to source2() : | string.swift:103:13:103:13 | taintedCString | result |
1361-
| string.swift:104:13:104:13 | taintedUnicodeScalars | string.swift:99:31:99:39 | call to source2() : | string.swift:104:13:104:13 | taintedUnicodeScalars | result |
1381+
| string.swift:126:13:126:13 | tainted | string.swift:121:17:121:25 | call to source2() : | string.swift:126:13:126:13 | tainted | result |
1382+
| string.swift:127:13:127:13 | taintedCString | string.swift:122:24:122:32 | call to source2() : | string.swift:127:13:127:13 | taintedCString | result |
1383+
| string.swift:128:13:128:13 | taintedUnicodeScalars | string.swift:123:31:123:39 | call to source2() : | string.swift:128:13:128:13 | taintedUnicodeScalars | result |
13621384
| subscript.swift:13:15:13:25 | ...[...] | subscript.swift:13:15:13:22 | call to source() : | subscript.swift:13:15:13:25 | ...[...] | result |
13631385
| subscript.swift:14:15:14:26 | ...[...] | subscript.swift:14:15:14:23 | call to source2() : | subscript.swift:14:15:14:26 | ...[...] | result |
13641386
| try.swift:9:13:9:24 | try ... | try.swift:9:17:9:24 | call to source() : | try.swift:9:13:9:24 | try ... | result |

0 commit comments

Comments
 (0)