Skip to content

Commit 15b8aa1

Browse files
committed
Swift: Effect on other tests :)
1 parent 6cb9198 commit 15b8aa1

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ edges
2222
| testCoreData2.swift:52:41:52:41 | bankAccountNo : | testCoreData2.swift:52:2:52:10 | [post] ...? [notStoredBankAccountNumber] : |
2323
| testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] : | testCoreData2.swift:57:3:57:3 | [post] obj |
2424
| testCoreData2.swift:57:29:57:29 | bankAccountNo : | testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] : |
25+
| testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] : | testCoreData2.swift:60:4:60:4 | [post] obj |
26+
| testCoreData2.swift:60:30:60:30 | bankAccountNo : | testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] : |
27+
| testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] : | testCoreData2.swift:62:4:62:4 | [post] obj |
28+
| testCoreData2.swift:62:30:62:30 | bankAccountNo : | testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] : |
29+
| testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] : | testCoreData2.swift:65:3:65:3 | [post] obj |
30+
| testCoreData2.swift:65:29:65:29 | bankAccountNo : | testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] : |
2531
| testCoreData.swift:18:19:18:26 | value : | testCoreData.swift:19:12:19:12 | value |
2632
| testCoreData.swift:31:3:31:3 | newValue : | testCoreData.swift:32:13:32:13 | newValue |
2733
| testCoreData.swift:61:25:61:25 | password : | testCoreData.swift:18:19:18:26 | value : |
@@ -130,6 +136,15 @@ nodes
130136
| testCoreData2.swift:57:3:57:3 | [post] obj | semmle.label | [post] obj |
131137
| testCoreData2.swift:57:3:57:3 | [post] obj [myBankAccountNumber] : | semmle.label | [post] obj [myBankAccountNumber] : |
132138
| testCoreData2.swift:57:29:57:29 | bankAccountNo : | semmle.label | bankAccountNo : |
139+
| testCoreData2.swift:60:4:60:4 | [post] obj | semmle.label | [post] obj |
140+
| testCoreData2.swift:60:4:60:4 | [post] obj [myBankAccountNumber] : | semmle.label | [post] obj [myBankAccountNumber] : |
141+
| testCoreData2.swift:60:30:60:30 | bankAccountNo : | semmle.label | bankAccountNo : |
142+
| testCoreData2.swift:62:4:62:4 | [post] obj | semmle.label | [post] obj |
143+
| testCoreData2.swift:62:4:62:4 | [post] obj [myBankAccountNumber] : | semmle.label | [post] obj [myBankAccountNumber] : |
144+
| testCoreData2.swift:62:30:62:30 | bankAccountNo : | semmle.label | bankAccountNo : |
145+
| testCoreData2.swift:65:3:65:3 | [post] obj | semmle.label | [post] obj |
146+
| testCoreData2.swift:65:3:65:3 | [post] obj [myBankAccountNumber] : | semmle.label | [post] obj [myBankAccountNumber] : |
147+
| testCoreData2.swift:65:29:65:29 | bankAccountNo : | semmle.label | bankAccountNo : |
133148
| testCoreData.swift:18:19:18:26 | value : | semmle.label | value : |
134149
| testCoreData.swift:19:12:19:12 | value | semmle.label | value |
135150
| testCoreData.swift:31:3:31:3 | newValue : | semmle.label | newValue : |
@@ -284,6 +299,9 @@ subpaths
284299
| testCoreData2.swift:50:2:50:10 | ...? | testCoreData2.swift:50:35:50:35 | bankAccountNo : | testCoreData2.swift:50:2:50:10 | [post] ...? | This operation stores '[post] ...?' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:50:35:50:35 | bankAccountNo : | bankAccountNo |
285300
| testCoreData2.swift:52:2:52:10 | ...? | testCoreData2.swift:52:41:52:41 | bankAccountNo : | testCoreData2.swift:52:2:52:10 | [post] ...? | This operation stores '[post] ...?' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:52:41:52:41 | bankAccountNo : | bankAccountNo |
286301
| testCoreData2.swift:57:3:57:3 | obj | testCoreData2.swift:57:29:57:29 | bankAccountNo : | testCoreData2.swift:57:3:57:3 | [post] obj | This operation stores '[post] obj' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:57:29:57:29 | bankAccountNo : | bankAccountNo |
302+
| testCoreData2.swift:60:4:60:4 | obj | testCoreData2.swift:60:30:60:30 | bankAccountNo : | testCoreData2.swift:60:4:60:4 | [post] obj | This operation stores '[post] obj' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:60:30:60:30 | bankAccountNo : | bankAccountNo |
303+
| testCoreData2.swift:62:4:62:4 | obj | testCoreData2.swift:62:30:62:30 | bankAccountNo : | testCoreData2.swift:62:4:62:4 | [post] obj | This operation stores '[post] obj' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:62:30:62:30 | bankAccountNo : | bankAccountNo |
304+
| testCoreData2.swift:65:3:65:3 | obj | testCoreData2.swift:65:29:65:29 | bankAccountNo : | testCoreData2.swift:65:3:65:3 | [post] obj | This operation stores '[post] obj' in a database. It may contain unencrypted sensitive data from $@. | testCoreData2.swift:65:29:65:29 | bankAccountNo : | bankAccountNo |
287305
| testCoreData.swift:19:12:19:12 | value | testCoreData.swift:61:25:61:25 | password : | testCoreData.swift:19:12:19:12 | value | This operation stores 'value' in a database. It may contain unencrypted sensitive data from $@. | testCoreData.swift:61:25:61:25 | password : | password |
288306
| testCoreData.swift:32:13:32:13 | newValue | testCoreData.swift:64:16:64:16 | password : | testCoreData.swift:32:13:32:13 | newValue | This operation stores 'newValue' in a database. It may contain unencrypted sensitive data from $@. | testCoreData.swift:64:16:64:16 | password : | password |
289307
| testCoreData.swift:48:15:48:15 | password | testCoreData.swift:48:15:48:15 | password | testCoreData.swift:48:15:48:15 | password | This operation stores 'password' in a database. It may contain unencrypted sensitive data from $@. | testCoreData.swift:48:15:48:15 | password | password |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ class testCoreData2_2 {
5757
obj.myBankAccountNumber = bankAccountNo // BAD
5858

5959
if #available(iOS 10.0, *) {
60-
obj.myBankAccountNumber = bankAccountNo // BAD [NOT DETECTED]
60+
obj.myBankAccountNumber = bankAccountNo // BAD
6161
} else {
62-
obj.myBankAccountNumber = bankAccountNo // BAD [NOT DETECTED]
62+
obj.myBankAccountNumber = bankAccountNo // BAD
6363
}
6464

65-
obj.myBankAccountNumber = bankAccountNo // BAD [NOT DETECTED]
65+
obj.myBankAccountNumber = bankAccountNo // BAD
6666
}
6767
}

0 commit comments

Comments
 (0)