Swift: Add test case.

This commit is contained in:
Geoffrey White
2023-11-06 15:29:10 +00:00
parent c6bc1a3f3a
commit 424046d238
2 changed files with 22 additions and 0 deletions

View File

@@ -138,6 +138,7 @@
| testGRDB.swift:208:81:208:81 | password | label:password, type:credential |
| testGRDB.swift:210:85:210:85 | password | label:password, type:credential |
| testGRDB.swift:212:99:212:99 | password | label:password, type:credential |
| testRealm2.swift:18:11:18:11 | myPassword | label:myPassword, type:credential |
| testRealm.swift:31:20:31:20 | .password | label:password, type:credential |
| testRealm.swift:41:11:41:11 | myPassword | label:myPassword, type:credential |
| testRealm.swift:49:11:49:11 | myPassword | label:myPassword, type:credential |

View File

@@ -0,0 +1,21 @@
//codeql-extractor-options: -module-name RealmSwift
// --- stubs ---
class Object {
}
// --- tests ---
class MyRealmSwiftObject3 : Object {
override init() { data = "" }
var data: String
}
func test1(o: MyRealmSwiftObject3, myHarmless: String, myPassword : String) {
// ...
o.data = myPassword // BAD [NOT DETECTED]
o.data = myHarmless
// ...
}