@@ -80,14 +80,45 @@ class AppDelegate: UIApplicationDelegate {
80
80
}
81
81
82
82
func application( _ application: UIApplication , didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? ) -> Bool {
83
- _ = launchOptions ? [ . url] // $ source=remote
83
+ let url = launchOptions ? [ . url] // $ source=remote
84
+ sink ( arg: url) // $ tainted
84
85
return true
85
86
}
86
87
87
88
func application( _ application: UIApplication , willFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? ) -> Bool {
88
- _ = launchOptions ? [ . url] // $ source=remote
89
+ let url = launchOptions ? [ . url] // $ source=remote
90
+ sink ( arg: url) // $ tainted
91
+
92
+ let url2 = launchOptions ? [ . url] as! String // $ source=remote
93
+ sink ( arg: url2) // $ tainted
94
+
95
+ if let url3 = launchOptions ? [ . url] as? String { // $ source=remote
96
+ sink ( arg: url3) // $ tainted
97
+ }
98
+
99
+ if let options = launchOptions {
100
+ let url4 = options [ . url] as! String // $ source=remote
101
+ sink ( arg: url4) // $ tainted
102
+ }
103
+
104
+ switch launchOptions {
105
+ case . some( let options) :
106
+ let url5 = options [ . url] // $ MISSING: source=remote
107
+ sink ( arg: url5) // $ MISSING: tainted
108
+ case . none:
109
+ break
110
+ }
111
+
112
+ processLaunchOptions ( options: launchOptions)
113
+
89
114
return true
90
115
}
116
+
117
+ private func processLaunchOptions( options: [ UIApplication . LaunchOptionsKey : Any ] ? ) {
118
+ // (called above)
119
+ let url = options ? [ . url] // $ MISSING: source=remote
120
+ sink ( arg: url) // $ MISSING: tainted
121
+ }
91
122
}
92
123
93
124
class SceneDelegate : UISceneDelegate {
0 commit comments