Skip to content

Commit 7ed520a

Browse files
committed
Swift: update test expectations after hiding InOutExpr
1 parent c36ce78 commit 7ed520a

File tree

8 files changed

+158
-145
lines changed

8 files changed

+158
-145
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| statements.swift:75:7:75:7 | yield ... | 0 | file://:0:0:0:0 | &... |
2-
| statements.swift:78:7:78:14 | yield ... | 0 | statements.swift:78:13:78:14 | &... |
1+
| statements.swift:75:7:75:7 | yield ... | 0 | file://:0:0:0:0 | .x |
2+
| statements.swift:78:7:78:14 | yield ... | 0 | statements.swift:78:14:78:14 | .x |

swift/ql/test/extractor-tests/updates/PrintAst.expected

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ v5.8.swift:
3333
# 5| Type = Temperature
3434
# 5| getBody(): [BraceStmt] { ... }
3535
# 5| getElement(0): [YieldStmt] yield ...
36-
#-----| getResult(0): [InOutExpr] &...
37-
#-----| getSubExpr(): [MemberRefExpr] .degreesCelsius
38-
#-----| getBase(): [DeclRefExpr] self
36+
#-----| getResult(0): [MemberRefExpr] .degreesCelsius
37+
#-----| getBase(): [DeclRefExpr] self
38+
#-----| getResult(0).getFullyConverted(): [InOutExpr] &...
3939
# 4| getMember(2): [Initializer] Temperature.init(degreesCelsius:)
4040
# 4| InterfaceType = (Temperature.Type) -> (Double) -> Temperature
4141
# 4| getSelfParam(): [ParamDecl] self
@@ -145,9 +145,9 @@ v5.8.swift:
145145
# 30| Type = Button
146146
# 30| getBody(): [BraceStmt] { ... }
147147
# 30| getElement(0): [YieldStmt] yield ...
148-
#-----| getResult(0): [InOutExpr] &...
149-
#-----| getSubExpr(): [MemberRefExpr] .tapHandler
150-
#-----| getBase(): [DeclRefExpr] self
148+
#-----| getResult(0): [MemberRefExpr] .tapHandler
149+
#-----| getBase(): [DeclRefExpr] self
150+
#-----| getResult(0).getFullyConverted(): [InOutExpr] &...
151151
# 29| getMember(2): [Initializer] Button.init()
152152
# 29| InterfaceType = (Button.Type) -> () -> Button
153153
# 29| getSelfParam(): [ParamDecl] self
@@ -197,9 +197,9 @@ v5.8.swift:
197197
# 34| Type = ViewController
198198
# 34| getBody(): [BraceStmt] { ... }
199199
# 34| getElement(0): [YieldStmt] yield ...
200-
#-----| getResult(0): [InOutExpr] &...
201-
#-----| getSubExpr(): [MemberRefExpr] .button
202-
#-----| getBase(): [DeclRefExpr] self
200+
#-----| getResult(0): [MemberRefExpr] .button
201+
#-----| getBase(): [DeclRefExpr] self
202+
#-----| getResult(0).getFullyConverted(): [InOutExpr] &...
203203
# 36| getMember(2): [NamedFunction] setup()
204204
# 36| InterfaceType = (ViewController) -> () -> ()
205205
# 36| getSelfParam(): [ParamDecl] self

swift/ql/test/library-tests/dataflow/taint/core/LocalTaint.expected

Lines changed: 105 additions & 105 deletions
Large diffs are not rendered by default.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ edges
4646
| stringinterpolation.swift:7:6:7:6 | self [second] | file://:0:0:0:0 | self [second] |
4747
| stringinterpolation.swift:7:6:7:6 | value | file://:0:0:0:0 | value |
4848
| stringinterpolation.swift:11:36:11:44 | pair [first] | stringinterpolation.swift:13:36:13:36 | pair [first] |
49-
| stringinterpolation.swift:13:3:13:3 | [post] &... | stringinterpolation.swift:11:11:14:2 | self[return] |
49+
| stringinterpolation.swift:13:3:13:3 | [post] self | stringinterpolation.swift:11:11:14:2 | self[return] |
5050
| stringinterpolation.swift:13:36:13:36 | pair [first] | stringinterpolation.swift:6:6:6:6 | self [first] |
5151
| stringinterpolation.swift:13:36:13:36 | pair [first] | stringinterpolation.swift:13:36:13:41 | .first |
5252
| stringinterpolation.swift:13:36:13:41 | .first | stringinterpolation.swift:11:11:14:2 | self[return] |
53-
| stringinterpolation.swift:13:36:13:41 | .first | stringinterpolation.swift:13:3:13:3 | [post] &... |
53+
| stringinterpolation.swift:13:36:13:41 | .first | stringinterpolation.swift:13:3:13:3 | [post] self |
5454
| stringinterpolation.swift:19:2:19:2 | [post] p1 [first] | stringinterpolation.swift:20:2:20:2 | p1 [first] |
5555
| stringinterpolation.swift:19:13:19:20 | call to source() | stringinterpolation.swift:6:6:6:6 | value |
5656
| stringinterpolation.swift:19:13:19:20 | call to source() | stringinterpolation.swift:19:2:19:2 | [post] p1 [first] |
@@ -59,9 +59,9 @@ edges
5959
| stringinterpolation.swift:22:21:22:21 | p1 [first] | stringinterpolation.swift:6:6:6:6 | self [first] |
6060
| stringinterpolation.swift:22:21:22:21 | p1 [first] | stringinterpolation.swift:22:21:22:24 | .first |
6161
| stringinterpolation.swift:22:21:22:24 | .first | stringinterpolation.swift:22:12:22:12 | "..." |
62-
| stringinterpolation.swift:24:20:24:20 | [post] &... | stringinterpolation.swift:24:12:24:12 | "..." |
62+
| stringinterpolation.swift:24:20:24:20 | [post] $interpolation | stringinterpolation.swift:24:12:24:12 | "..." |
6363
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:11:36:11:44 | pair [first] |
64-
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:24:20:24:20 | [post] &... |
64+
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:24:20:24:20 | [post] $interpolation |
6565
| stringinterpolation.swift:28:2:28:2 | [post] p2 [second] | stringinterpolation.swift:31:21:31:21 | p2 [second] |
6666
| stringinterpolation.swift:28:14:28:21 | call to source() | stringinterpolation.swift:7:6:7:6 | value |
6767
| stringinterpolation.swift:28:14:28:21 | call to source() | stringinterpolation.swift:28:2:28:2 | [post] p2 [second] |
@@ -162,7 +162,7 @@ nodes
162162
| stringinterpolation.swift:7:6:7:6 | value | semmle.label | value |
163163
| stringinterpolation.swift:11:11:14:2 | self[return] | semmle.label | self[return] |
164164
| stringinterpolation.swift:11:36:11:44 | pair [first] | semmle.label | pair [first] |
165-
| stringinterpolation.swift:13:3:13:3 | [post] &... | semmle.label | [post] &... |
165+
| stringinterpolation.swift:13:3:13:3 | [post] self | semmle.label | [post] self |
166166
| stringinterpolation.swift:13:36:13:36 | pair [first] | semmle.label | pair [first] |
167167
| stringinterpolation.swift:13:36:13:41 | .first | semmle.label | .first |
168168
| stringinterpolation.swift:19:2:19:2 | [post] p1 [first] | semmle.label | [post] p1 [first] |
@@ -172,7 +172,7 @@ nodes
172172
| stringinterpolation.swift:22:21:22:21 | p1 [first] | semmle.label | p1 [first] |
173173
| stringinterpolation.swift:22:21:22:24 | .first | semmle.label | .first |
174174
| stringinterpolation.swift:24:12:24:12 | "..." | semmle.label | "..." |
175-
| stringinterpolation.swift:24:20:24:20 | [post] &... | semmle.label | [post] &... |
175+
| stringinterpolation.swift:24:20:24:20 | [post] $interpolation | semmle.label | [post] $interpolation |
176176
| stringinterpolation.swift:24:21:24:21 | p1 [first] | semmle.label | p1 [first] |
177177
| stringinterpolation.swift:28:2:28:2 | [post] p2 [second] | semmle.label | [post] p2 [second] |
178178
| stringinterpolation.swift:28:14:28:21 | call to source() | semmle.label | call to source() |
@@ -195,8 +195,8 @@ subpaths
195195
| stringinterpolation.swift:13:36:13:36 | pair [first] | stringinterpolation.swift:6:6:6:6 | self [first] | file://:0:0:0:0 | .first | stringinterpolation.swift:13:36:13:41 | .first |
196196
| stringinterpolation.swift:19:13:19:20 | call to source() | stringinterpolation.swift:6:6:6:6 | value | file://:0:0:0:0 | [post] self [first] | stringinterpolation.swift:19:2:19:2 | [post] p1 [first] |
197197
| stringinterpolation.swift:22:21:22:21 | p1 [first] | stringinterpolation.swift:6:6:6:6 | self [first] | file://:0:0:0:0 | .first | stringinterpolation.swift:22:21:22:24 | .first |
198-
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:11:36:11:44 | pair [first] | stringinterpolation.swift:11:11:14:2 | self[return] | stringinterpolation.swift:24:20:24:20 | [post] &... |
199-
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:11:36:11:44 | pair [first] | stringinterpolation.swift:13:3:13:3 | [post] &... | stringinterpolation.swift:24:20:24:20 | [post] &... |
198+
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:11:36:11:44 | pair [first] | stringinterpolation.swift:11:11:14:2 | self[return] | stringinterpolation.swift:24:20:24:20 | [post] $interpolation |
199+
| stringinterpolation.swift:24:21:24:21 | p1 [first] | stringinterpolation.swift:11:36:11:44 | pair [first] | stringinterpolation.swift:13:3:13:3 | [post] self | stringinterpolation.swift:24:20:24:20 | [post] $interpolation |
200200
| stringinterpolation.swift:28:14:28:21 | call to source() | stringinterpolation.swift:7:6:7:6 | value | file://:0:0:0:0 | [post] self [second] | stringinterpolation.swift:28:2:28:2 | [post] p2 [second] |
201201
| stringinterpolation.swift:31:21:31:21 | p2 [second] | stringinterpolation.swift:7:6:7:6 | self [second] | file://:0:0:0:0 | .second | stringinterpolation.swift:31:21:31:24 | .second |
202202
#select
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
| assignment.swift:6:2:6:6 | ... = ... | AssignExpr, Assignment | x | 1 |
2-
| assignment.swift:9:2:9:7 | ... .+=(_:_:) ... | AssignAddExpr, AssignArithmeticOperation, AssignOperation, Assignment | &... | 1 |
3-
| assignment.swift:10:2:10:7 | ... .-=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignSubExpr, Assignment | &... | 1 |
4-
| assignment.swift:11:2:11:7 | ... .*=(_:_:) ... | AssignArithmeticOperation, AssignMulExpr, AssignOperation, Assignment | &... | 1 |
5-
| assignment.swift:12:2:12:7 | ... ./=(_:_:) ... | AssignArithmeticOperation, AssignDivExpr, AssignOperation, Assignment | &... | 1 |
6-
| assignment.swift:13:2:13:7 | ... .%=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignRemExpr, Assignment | &... | 1 |
7-
| assignment.swift:16:2:16:7 | ... .&=(_:_:) ... | AssignAndExpr, AssignBitwiseOperation, AssignOperation, Assignment | &... | 1 |
8-
| assignment.swift:17:2:17:7 | ... .\|=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignOrExpr, Assignment | &... | 1 |
9-
| assignment.swift:18:2:18:7 | ... .^=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignXorExpr, Assignment | &... | 1 |
10-
| assignment.swift:19:2:19:8 | ... .<<=(_:_:) ... | AssignBitwiseOperation, AssignLShiftExpr, AssignOperation, Assignment | &... | 1 |
11-
| assignment.swift:20:2:20:8 | ... .>>=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignRShiftExpr, Assignment | &... | 1 |
12-
| assignment.swift:23:2:23:8 | ... .&*=(_:_:) ... | AssignArithmeticOperation, AssignMulExpr, AssignOperation, Assignment, hasOverflowOperator | &... | 1 |
13-
| assignment.swift:24:2:24:8 | ... .&+=(_:_:) ... | AssignAddExpr, AssignArithmeticOperation, AssignOperation, Assignment, hasOverflowOperator | &... | 1 |
14-
| assignment.swift:25:2:25:8 | ... .&-=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignSubExpr, Assignment, hasOverflowOperator | &... | 1 |
15-
| assignment.swift:26:2:26:9 | ... .&<<=(_:_:) ... | AssignBitwiseOperation, AssignLShiftExpr, AssignOperation, Assignment, hasOverflowOperator | &... | 1 |
16-
| assignment.swift:27:2:27:9 | ... .&>>=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignRShiftExpr, Assignment, hasOverflowOperator | &... | 1 |
2+
| assignment.swift:9:2:9:7 | ... .+=(_:_:) ... | AssignAddExpr, AssignArithmeticOperation, AssignOperation, Assignment | x | 1 |
3+
| assignment.swift:10:2:10:7 | ... .-=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignSubExpr, Assignment | x | 1 |
4+
| assignment.swift:11:2:11:7 | ... .*=(_:_:) ... | AssignArithmeticOperation, AssignMulExpr, AssignOperation, Assignment | x | 1 |
5+
| assignment.swift:12:2:12:7 | ... ./=(_:_:) ... | AssignArithmeticOperation, AssignDivExpr, AssignOperation, Assignment | x | 1 |
6+
| assignment.swift:13:2:13:7 | ... .%=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignRemExpr, Assignment | x | 1 |
7+
| assignment.swift:16:2:16:7 | ... .&=(_:_:) ... | AssignAndExpr, AssignBitwiseOperation, AssignOperation, Assignment | x | 1 |
8+
| assignment.swift:17:2:17:7 | ... .\|=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignOrExpr, Assignment | x | 1 |
9+
| assignment.swift:18:2:18:7 | ... .^=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignXorExpr, Assignment | x | 1 |
10+
| assignment.swift:19:2:19:8 | ... .<<=(_:_:) ... | AssignBitwiseOperation, AssignLShiftExpr, AssignOperation, Assignment | x | 1 |
11+
| assignment.swift:20:2:20:8 | ... .>>=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignRShiftExpr, Assignment | x | 1 |
12+
| assignment.swift:23:2:23:8 | ... .&*=(_:_:) ... | AssignArithmeticOperation, AssignMulExpr, AssignOperation, Assignment, hasOverflowOperator | x | 1 |
13+
| assignment.swift:24:2:24:8 | ... .&+=(_:_:) ... | AssignAddExpr, AssignArithmeticOperation, AssignOperation, Assignment, hasOverflowOperator | x | 1 |
14+
| assignment.swift:25:2:25:8 | ... .&-=(_:_:) ... | AssignArithmeticOperation, AssignOperation, AssignSubExpr, Assignment, hasOverflowOperator | x | 1 |
15+
| assignment.swift:26:2:26:9 | ... .&<<=(_:_:) ... | AssignBitwiseOperation, AssignLShiftExpr, AssignOperation, Assignment, hasOverflowOperator | x | 1 |
16+
| assignment.swift:27:2:27:9 | ... .&>>=(_:_:) ... | AssignBitwiseOperation, AssignOperation, AssignRShiftExpr, Assignment, hasOverflowOperator | x | 1 |
1717
| assignment.swift:33:2:33:6 | ... = ... | AssignExpr, Assignment | y | z |
18-
| assignment.swift:34:2:34:8 | ... ..&=(_:_:) ... | AssignOperation, AssignPointwiseAndExpr, Assignment | &... | m |
19-
| assignment.swift:35:2:35:8 | ... ..\|=(_:_:) ... | AssignOperation, AssignPointwiseOrExpr, Assignment | &... | m |
20-
| assignment.swift:36:2:36:8 | ... ..^=(_:_:) ... | AssignOperation, AssignPointwiseXorExpr, Assignment | &... | m |
18+
| assignment.swift:34:2:34:8 | ... ..&=(_:_:) ... | AssignOperation, AssignPointwiseAndExpr, Assignment | m | m |
19+
| assignment.swift:35:2:35:8 | ... ..\|=(_:_:) ... | AssignOperation, AssignPointwiseOrExpr, Assignment | m | m |
20+
| assignment.swift:36:2:36:8 | ... ..^=(_:_:) ... | AssignOperation, AssignPointwiseXorExpr, Assignment | m | m |

swift/ql/test/library-tests/regex/regex.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ func myRegexpMethodsTests(b: Bool, str_unknown: String) throws {
119119
// --- RangeReplaceableCollection ---
120120

121121
var inputVar = input
122-
inputVar.replace(regex, with: "") // $ regex=.* input=&...
122+
inputVar.replace(regex, with: "") // $ regex=.* input=inputVar
123123
_ = input.replacing(regex, with: "") // $ regex=.* input=input
124-
inputVar.trimPrefix(regex) // $ regex=.* input=&...
124+
inputVar.trimPrefix(regex) // $ regex=.* input=inputVar
125125

126126
// --- StringProtocol ---
127127

swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.expected

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ edges
5353
| InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:187:5:187:5 | [post] self |
5454
| InsecureTLS.swift:187:42:187:42 | withMinVersion | InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] |
5555
| InsecureTLS.swift:193:51:193:74 | .TLSv10 | InsecureTLS.swift:185:20:185:36 | withMinVersion |
56+
| InsecureTLS.swift:196:56:196:63 | value | InsecureTLS.swift:196:1:198:1 | version[return] |
57+
| InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:202:24:202:24 | [post] config |
58+
| InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] |
59+
| InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:196:56:196:63 | value |
60+
| InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion |
5661
| file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocolVersion] | file://:0:0:0:0 | [post] self |
5762
| file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocolVersion] | file://:0:0:0:0 | [post] self |
5863
| file://:0:0:0:0 | [post] self [tlsMaximumSupportedProtocol] | file://:0:0:0:0 | [post] self |
@@ -112,6 +117,12 @@ nodes
112117
| InsecureTLS.swift:187:5:187:5 | [post] self [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] self [tlsMinimumSupportedProtocolVersion] |
113118
| InsecureTLS.swift:187:42:187:42 | withMinVersion | semmle.label | withMinVersion |
114119
| InsecureTLS.swift:193:51:193:74 | .TLSv10 | semmle.label | .TLSv10 |
120+
| InsecureTLS.swift:196:1:198:1 | version[return] | semmle.label | version[return] |
121+
| InsecureTLS.swift:196:56:196:63 | value | semmle.label | value |
122+
| InsecureTLS.swift:202:24:202:24 | [post] config | semmle.label | [post] config |
123+
| InsecureTLS.swift:202:24:202:24 | [post] config [tlsMinimumSupportedProtocolVersion] | semmle.label | [post] config [tlsMinimumSupportedProtocolVersion] |
124+
| InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion | semmle.label | [post] getter for .tlsMinimumSupportedProtocolVersion |
125+
| InsecureTLS.swift:202:74:202:97 | .TLSv10 | semmle.label | .TLSv10 |
115126
| file://:0:0:0:0 | .TLSVersion | semmle.label | .TLSVersion |
116127
| file://:0:0:0:0 | [post] self | semmle.label | [post] self |
117128
| file://:0:0:0:0 | [post] self | semmle.label | [post] self |
@@ -153,6 +164,7 @@ subpaths
153164
| InsecureTLS.swift:165:47:165:51 | .TLSVersion | InsecureTLS.swift:19:7:19:7 | value | file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:165:3:165:3 | [post] config [tlsMinimumSupportedProtocolVersion] |
154165
| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | file://:0:0:0:0 | [post] self | InsecureTLS.swift:181:3:181:9 | [post] getter for .config |
155166
| InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:19:7:19:7 | value | file://:0:0:0:0 | [post] self [tlsMinimumSupportedProtocolVersion] | InsecureTLS.swift:181:3:181:9 | [post] getter for .config [tlsMinimumSupportedProtocolVersion] |
167+
| InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:196:56:196:63 | value | InsecureTLS.swift:196:1:198:1 | version[return] | InsecureTLS.swift:202:24:202:31 | [post] getter for .tlsMinimumSupportedProtocolVersion |
156168
#select
157169
| InsecureTLS.swift:40:3:40:3 | [post] config | InsecureTLS.swift:40:47:40:70 | .TLSv10 | InsecureTLS.swift:40:3:40:3 | [post] config | This TLS configuration is insecure. |
158170
| InsecureTLS.swift:45:3:45:3 | [post] config | InsecureTLS.swift:45:47:45:70 | .TLSv11 | InsecureTLS.swift:45:3:45:3 | [post] config | This TLS configuration is insecure. |
@@ -164,6 +176,7 @@ subpaths
164176
| InsecureTLS.swift:165:3:165:3 | [post] config | InsecureTLS.swift:163:20:163:43 | .TLSv10 | InsecureTLS.swift:165:3:165:3 | [post] config | This TLS configuration is insecure. |
165177
| InsecureTLS.swift:181:3:181:9 | [post] getter for .config | InsecureTLS.swift:181:53:181:76 | .TLSv10 | InsecureTLS.swift:181:3:181:9 | [post] getter for .config | This TLS configuration is insecure. |
166178
| InsecureTLS.swift:187:5:187:5 | [post] self | InsecureTLS.swift:193:51:193:74 | .TLSv10 | InsecureTLS.swift:187:5:187:5 | [post] self | This TLS configuration is insecure. |
179+
| InsecureTLS.swift:202:24:202:24 | [post] config | InsecureTLS.swift:202:74:202:97 | .TLSv10 | InsecureTLS.swift:202:24:202:24 | [post] config | This TLS configuration is insecure. |
167180
| file://:0:0:0:0 | [post] self | InsecureTLS.swift:40:47:40:70 | .TLSv10 | file://:0:0:0:0 | [post] self | This TLS configuration is insecure. |
168181
| file://:0:0:0:0 | [post] self | InsecureTLS.swift:45:47:45:70 | .TLSv11 | file://:0:0:0:0 | [post] self | This TLS configuration is insecure. |
169182
| file://:0:0:0:0 | [post] self | InsecureTLS.swift:57:47:57:70 | .TLSv10 | file://:0:0:0:0 | [post] self | This TLS configuration is insecure. |

swift/ql/test/query-tests/Security/CWE-757/InsecureTLS.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ func setVersion(version: inout tls_protocol_version_t, value: tls_protocol_versi
199199

200200
func case_22(config: URLSessionConfiguration) {
201201
setVersion(version: &config.tlsMinimumSupportedProtocolVersion, value: tls_protocol_version_t.TLSv13) // GOOD
202-
setVersion(version: &config.tlsMinimumSupportedProtocolVersion, value: tls_protocol_version_t.TLSv10) // BAD [NOT DETECTED]
202+
setVersion(version: &config.tlsMinimumSupportedProtocolVersion, value: tls_protocol_version_t.TLSv10) // BAD
203203
}

0 commit comments

Comments
 (0)