Skip to content

Commit 0f8b0a7

Browse files
committed
Swift: Accept test changes (improvement).
1 parent 7c72898 commit 0f8b0a7

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

swift/ql/test/query-tests/Security/CWE-311/CleartextTransmission.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ nodes
6464
| testSend.swift:78:27:78:30 | .CarePlanID | semmle.label | .CarePlanID |
6565
| testSend.swift:79:27:79:30 | .BankCardNo | semmle.label | .BankCardNo |
6666
| testSend.swift:80:27:80:30 | .MyCreditRating | semmle.label | .MyCreditRating |
67+
| testSend.swift:81:27:81:30 | .OneTimeCode | semmle.label | .OneTimeCode |
6768
| testSend.swift:86:7:86:7 | self | semmle.label | self |
6869
| testSend.swift:94:27:94:30 | .password | semmle.label | .password |
6970
| testSend.swift:94:27:94:39 | .value | semmle.label | .value |
@@ -118,6 +119,7 @@ subpaths
118119
| testSend.swift:78:27:78:30 | .CarePlanID | testSend.swift:78:27:78:30 | .CarePlanID | testSend.swift:78:27:78:30 | .CarePlanID | This operation transmits '.CarePlanID', which may contain unencrypted sensitive data from $@. | testSend.swift:78:27:78:30 | .CarePlanID | .CarePlanID |
119120
| testSend.swift:79:27:79:30 | .BankCardNo | testSend.swift:79:27:79:30 | .BankCardNo | testSend.swift:79:27:79:30 | .BankCardNo | This operation transmits '.BankCardNo', which may contain unencrypted sensitive data from $@. | testSend.swift:79:27:79:30 | .BankCardNo | .BankCardNo |
120121
| testSend.swift:80:27:80:30 | .MyCreditRating | testSend.swift:80:27:80:30 | .MyCreditRating | testSend.swift:80:27:80:30 | .MyCreditRating | This operation transmits '.MyCreditRating', which may contain unencrypted sensitive data from $@. | testSend.swift:80:27:80:30 | .MyCreditRating | .MyCreditRating |
122+
| testSend.swift:81:27:81:30 | .OneTimeCode | testSend.swift:81:27:81:30 | .OneTimeCode | testSend.swift:81:27:81:30 | .OneTimeCode | This operation transmits '.OneTimeCode', which may contain unencrypted sensitive data from $@. | testSend.swift:81:27:81:30 | .OneTimeCode | .OneTimeCode |
121123
| testSend.swift:94:27:94:39 | .value | testSend.swift:94:27:94:30 | .password | testSend.swift:94:27:94:39 | .value | This operation transmits '.value', which may contain unencrypted sensitive data from $@. | testSend.swift:94:27:94:30 | .password | .password |
122124
| testURL.swift:39:18:39:50 | ... .+(_:_:) ... | testURL.swift:39:50:39:50 | passwd | testURL.swift:39:18:39:50 | ... .+(_:_:) ... | This operation transmits '... .+(_:_:) ...', which may contain unencrypted sensitive data from $@. | testURL.swift:39:50:39:50 | passwd | passwd |
123125
| testURL.swift:41:18:41:51 | ... .+(_:_:) ... | testURL.swift:41:51:41:51 | account_no | testURL.swift:41:18:41:51 | ... .+(_:_:) ... | This operation transmits '... .+(_:_:) ...', which may contain unencrypted sensitive data from $@. | testURL.swift:41:51:41:51 | account_no | account_no |

swift/ql/test/query-tests/Security/CWE-311/SensitiveExprs.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
| testSend.swift:78:27:78:30 | .CarePlanID | label:CarePlanID, type:private information |
171171
| testSend.swift:79:27:79:30 | .BankCardNo | label:BankCardNo, type:private information |
172172
| testSend.swift:80:27:80:30 | .MyCreditRating | label:MyCreditRating, type:private information |
173+
| testSend.swift:81:27:81:30 | .OneTimeCode | label:OneTimeCode, type:credential |
173174
| testSend.swift:94:27:94:30 | .password | label:password, type:password |
174175
| testURL.swift:39:50:39:50 | passwd | label:passwd, type:password |
175176
| testURL.swift:41:51:41:51 | account_no | label:account_no, type:private information |

swift/ql/test/query-tests/Security/CWE-311/testSend.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func test2(password : String, license_key: String, ms: MyStruct, connection : NW
7878
connection.send(content: ms.CarePlanID, completion: .idempotent) // BAD
7979
connection.send(content: ms.BankCardNo, completion: .idempotent) // BAD
8080
connection.send(content: ms.MyCreditRating, completion: .idempotent) // BAD
81-
connection.send(content: ms.OneTimeCode, completion: .idempotent) // BAD [NOT DETECTED]
81+
connection.send(content: ms.OneTimeCode, completion: .idempotent) // BAD
8282
}
8383

8484
struct MyOuter {

0 commit comments

Comments
 (0)