1 parent 832173a commit bf5e9d7Copy full SHA for bf5e9d7
5 files changed
unified/ql/lib/ext/legacy-swift.model.yml
@@ -235,6 +235,7 @@ extensions:
235
- ["", "Connection", true, "scalar(_:_:)", "", "", "Argument[0]", "database-store", "manual"]
236
- ["", "Connection", true, "scalar(_:_:)", "", "", "Argument[1]", "database-store", "manual"]
237
- ["", "Connection", true, "init(_:readonly:)", "", "", "Argument[0]", "path-injection", "manual"]
238
+ - ["", "Connection.Location", true, "uri(_:parameters:)", "", "", "Argument[0]", "path-injection", "manual"]
239
- ["", "Database", true, "changePassphrase(_:)", "", "", "Argument[0]", "encryption-key", "manual"]
240
- ["", "Database", true, "usePassphrase(_:)", "", "", "Argument[0]", "encryption-key", "manual"]
241
- ["", "Database", true, "allStatements(arguments:sql:)", "", "", "Argument[arguments:]", "database-store", "manual"]
unified/ql/test/library-tests/mad/test.expected
@@ -15,6 +15,7 @@ isSink
15
| test.swift:100:24:100:36 | encryptionKey | encryption-key |
16
| test.swift:101:18:101:24 | fileURL | path-injection |
17
| test.swift:107:23:107:34 | seedFilePath | path-injection |
18
+| test.swift:119:29:119:34 | string | path-injection |
19
isSource
20
| test.swift:4:5:4:27 | String(...) | remote |
21
| test.swift:5:5:5:44 | String(...) | remote |
unified/ql/test/library-tests/mad/test.swift
@@ -108,3 +108,13 @@ func testQualifiedConstructors(
108
shouldCompactOnLaunch: nil,
109
syncConfiguration: nil)
110
}
111
+
112
+class Connection {
113
+ enum Location {
114
+ static func uri(_ path: String, parameters: String) {}
115
+ }
116
+}
117
118
+func testConnectionLocation(string: String) {
119
+ Connection.Location.uri(string, parameters: "") // $ isSink=path-injection
120
0 commit comments