mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Switch to MaD models for UISceneDelegate methods
This commit is contained in:
@@ -19,11 +19,10 @@ private class CustomUrlRemoteFlowSource extends SourceModelCsv {
|
||||
// Use dictionary value contents when available.
|
||||
// ";UIApplicationDelegate;true;application(_:didFinishLaunchingWithOptions:);;;Parameter[1].MapValue;remote",
|
||||
// ";UIApplicationDelegate;true;application(_:willFinishLaunchingWithOptions:);;;Parameter[1].MapValue;remote"
|
||||
// TODO 2: MaD doesn't seem to take into account extensions adopting to protocols even if the subtypes column is set to true.
|
||||
// ";UIWindowSceneDelegate;true;scene(_:continue:);;;Parameter[1];remote",
|
||||
// ";UIWindowSceneDelegate;true;scene(_:didUpdate:);;;Parameter[1];remote",
|
||||
// ";UIWindowSceneDelegate;true;scene(_:openURLContexts:);;;Parameter[1];remote",
|
||||
// ";UIWindowSceneDelegate;true;scene(_:willConnectTo:options:);;;Parameter[2];remote"
|
||||
";UISceneDelegate;true;scene(_:continue:);;;Parameter[1];remote",
|
||||
";UISceneDelegate;true;scene(_:didUpdate:);;;Parameter[1];remote",
|
||||
";UISceneDelegate;true;scene(_:openURLContexts:);;;Parameter[1];remote",
|
||||
";UISceneDelegate;true;scene(_:willConnectTo:options:);;;Parameter[2];remote"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -63,40 +62,6 @@ private class LaunchOptionsUrlVarDecl extends VarDecl {
|
||||
}
|
||||
}
|
||||
|
||||
/** A type or extension declaration adopting the protocol `UISceneDelegate`. */
|
||||
private class AdoptingUiSceneDelegate extends Decl {
|
||||
AdoptingUiSceneDelegate() {
|
||||
exists(ProtocolDecl delegate |
|
||||
this.(ExtensionDecl).getAProtocol().getABaseTypeDecl*() = delegate or
|
||||
this.(ClassOrStructDecl).getABaseTypeDecl*() = delegate
|
||||
|
|
||||
delegate.getName() = "UISceneDelegate"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An `OpenURLContexts`, `NSUserActivity`, or `ConnectionOptions` parameter of a `scene` method
|
||||
* declared in a type adopting `UISceneDelegate`.
|
||||
*/
|
||||
// This is a temporary workaround until the TODO 2 above is addressed.
|
||||
private class UiSceneDelegateSource extends RemoteFlowSource {
|
||||
UiSceneDelegateSource() {
|
||||
exists(FuncDecl f, ParamDecl p, AdoptingUiSceneDelegate d |
|
||||
f.getName() = "scene(_:" + ["continue", "didUpdate", "openURLContexts"] + ":)" and
|
||||
p = f.getParam(1)
|
||||
or
|
||||
f.getName() = "scene(_:willConnectTo:options:)" and
|
||||
p = f.getParam(2)
|
||||
|
|
||||
f.getEnclosingDecl() = d and
|
||||
this.(DataFlow::ParameterNode).getParameter() = p
|
||||
)
|
||||
}
|
||||
|
||||
override string getSourceType() { result = "Remote data in UIWindowSceneDelegate.scene" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A content implying that, if a `UIOpenURLContext` is tainted, then its field `url` is also tainted.
|
||||
*/
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
| customurlschemes.swift:61:52:61:62 | url | external |
|
||||
| customurlschemes.swift:66:9:66:28 | ...[...] | Remote URL in UIApplicationDelegate.application.launchOptions |
|
||||
| customurlschemes.swift:71:9:71:28 | ...[...] | Remote URL in UIApplicationDelegate.application.launchOptions |
|
||||
| customurlschemes.swift:77:59:77:76 | options | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:78:28:78:38 | continue | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:79:28:79:39 | didUpdate | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:80:28:80:65 | openURLContexts | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:86:59:86:76 | options | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:87:28:87:38 | continue | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:88:28:88:39 | didUpdate | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:89:28:89:65 | openURLContexts | Remote data in UIWindowSceneDelegate.scene |
|
||||
| customurlschemes.swift:77:59:77:76 | options | external |
|
||||
| customurlschemes.swift:78:28:78:38 | continue | external |
|
||||
| customurlschemes.swift:79:28:79:39 | didUpdate | external |
|
||||
| customurlschemes.swift:80:28:80:65 | openURLContexts | external |
|
||||
| customurlschemes.swift:86:59:86:76 | options | external |
|
||||
| customurlschemes.swift:87:28:87:38 | continue | external |
|
||||
| customurlschemes.swift:88:28:88:39 | didUpdate | external |
|
||||
| customurlschemes.swift:89:28:89:65 | openURLContexts | external |
|
||||
| data.swift:18:20:18:54 | call to Data.init(contentsOf:options:) | external |
|
||||
| file://:0:0:0:0 | .data | external |
|
||||
| file://:0:0:0:0 | .result | external |
|
||||
|
||||
Reference in New Issue
Block a user