Repository navigation
Conversation
Create a byte-for-byte baseline from original Swift for the unified Swift port, including query help and samples. Adaptations follow separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy the data flow configuration and query-specific models from the original Swift libraries without API or behavior adaptations. Keep source paths for provenance; the compiling port follows separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use unified taint tracking and declarative UIWebView/WKWebView sink models. Preserve checks for nil, absent, and tainted base URLs, and point the inline-expectation test at the unified query. The focused test passes with 12 result rows and no inline expectation failures. Retain six tainted-base-URL cases as MISSING for follow-up; this commit does not repair shared data flow or extraction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use node-based flowTo instead of flowToExpr, whose unified exprNode adapter is not yet implemented. This restores the UIWebView and WKWebView direct tainted-base-URL cases without changing shared data flow. Preserve all 12 baseline result rows and add two detections. Four relative-URL and Data cases remain explicitly MISSING. Both the focused test and the related JavaScript-evaluation test pass without learning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Explain that about:blank avoids local relative-URL resolution rather than promising to block absolute remote URLs. Keep navigation and content restrictions distinct from setting a trusted base URL. Validate the help XML and local samples. The external Web View XSS reference was checked with the restricted link-checking agent and remains unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ore readable and cleans up observeDiffInformedIncrementalMode).
|
QHelp previews: unified/ql/src/queries/security/CWE-079/UnsafeWebViewFetch.qhelpUnsafe WebView fetchFetching data in a web view without restricting the base URL may allow an attacker to access sensitive local data, for example using RecommendationWhen loading HTML into a web view, always set the ExampleIn the following example, a call to let webview = UIWebView()
...
webview.loadHTMLString(htmlData, baseURL: nil) // BADTo fix the problem, we set the let webview = UIWebView()
...
webview.loadHTMLString(htmlData, baseURL: URL(string: "about:blank")) // GOODReferences
|
Port the "Unsafe WebView fetch" query to unified, as
unified/swift/unsafe-webview-fetch. Developed with Copilot + the porting skill + GPT-6.1 Sol High Effort. Some cleanup afterwards - in particular the way the original query handledbaseURLwasn't great, it's considerably better now IMO. The fourMISSINGresults in the test have been diagnosed and written up as issues (not fixed here).DCA run to follow...