Repository navigation
Unified: Port UnsafeWebViewFetch query #23217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
geoffw0
wants to merge
15
commits into
github:main
Choose a base branch
from
geoffw0:unifiedwebview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2bc5797
unified: Copy unsafe WebView fetch query and tests unchanged
geoffw0 2e1536e
unified: Collect original unsafe WebView fetch logic in query
geoffw0 7c3b4e0
unified: Port unsafe WebView fetch with a compiling test baseline
geoffw0 5dee595
unified: Detect WebView fetches with tainted base URLs
geoffw0 8355923
unified: Clarify WebView base URL security guidance
geoffw0 9ce9d0a
Unified: Edit comments and plan.
geoffw0 5c3ae75
Unified: Model the base URLs, rather than using a hardcoded argument …
geoffw0 12f7752
Unified: Split the data flow configuration in two (this is probably m…
geoffw0 c2e0a8d
Unified: Remove the TODO, the causes have been identified and written…
geoffw0 6761d04
Unified: Tiny CodeQL cleanup.
geoffw0 34e51db
Unified: Clean up test annotation.
geoffw0 a89f3fa
Unified: Add tainted baseURL sources to the locations considered in d…
geoffw0 45131f0
Merge branch 'main' into unifiedwebview
geoffw0 3e9f136
Unified: Restrict taint sources to remote sources (for now).
geoffw0 5809af5
Merge branch 'main' into unifiedwebview
geoffw0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "extensions": [ | ||
| { | ||
| "addsTo": { | ||
| "pack": "codeql/unified-all", | ||
| "extensible": "legacySinkModel" | ||
| }, | ||
| "data": [ | ||
| // namespace, type, subtypes, name, signature, ext, input, kind, provenance | ||
| ["", "UIWebView", true, "loadHTMLString(_:baseURL:)", "", "", "Argument[0]", "webview-fetch", "manual"], | ||
| ["", "UIWebView", true, "loadHTMLString(_:baseURL:)", "", "", "Argument[baseURL:]", "webview-baseurl", "manual"], | ||
| ["", "WKWebView", true, "loadHTMLString(_:baseURL:)", "", "", "Argument[0]", "webview-fetch", "manual"], | ||
| ["", "WKWebView", true, "loadHTMLString(_:baseURL:)", "", "", "Argument[baseURL:]", "webview-baseurl", "manual"], | ||
| ["", "UIWebView", true, "load(_:mimeType:textEncodingName:baseURL:)", "", "", "Argument[0]", "webview-fetch", "manual"], | ||
| ["", "UIWebView", true, "load(_:mimeType:textEncodingName:baseURL:)", "", "", "Argument[baseURL:]", "webview-baseurl", "manual"], | ||
| ["", "WKWebView", true, "load(_:mimeType:characterEncodingName:baseURL:)", "", "", "Argument[0]", "webview-fetch", "manual"], | ||
| ["", "WKWebView", true, "load(_:mimeType:characterEncodingName:baseURL:)", "", "", "Argument[baseURL:]", "webview-baseurl", "manual"] | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
33 changes: 33 additions & 0 deletions
33
unified/ql/src/queries/security/CWE-079/UnsafeWebViewFetch.qhelp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!DOCTYPE qhelp PUBLIC | ||
| "-//Semmle//qhelp//EN" | ||
| "qhelp.dtd"> | ||
| <qhelp> | ||
| <overview> | ||
|
|
||
| <p>Fetching data in a web view without restricting the base URL may allow an attacker to access sensitive local data, for example using <code>file://</code>. Data can then be extracted from the software using the URL of a machine under the attacker's control. More generally, an attacker may use a URL under their control as part of a cross-site scripting attack.</p> | ||
|
|
||
| </overview> | ||
| <recommendation> | ||
|
|
||
| <p>When loading HTML into a web view, always set the <code>baseURL</code> to an appropriate URL that you control, or to <code>about:blank</code>. Do not use <code>nil</code>, as this does not restrict URLs that can be resolved. Also do not use a <code>baseURL</code> that could itself be controlled by an attacker.</p> | ||
|
|
||
| </recommendation> | ||
| <example> | ||
|
|
||
| <p>In the following example, a call to <code>UIWebView.loadHTMLString</code> has the <code>baseURL</code> set to <code>nil</code>, which does not restrict URLs that can be resolved from within the web page.</p> | ||
|
|
||
| <sample src="UnsafeWebViewFetchBad.swift" /> | ||
|
|
||
| <p>To fix the problem, we set the <code>baseURL</code> to <code>about:blank</code>. This avoids resolving relative URLs against the application's local file system. A base URL is not a general navigation restriction: absolute remote URLs still need appropriate navigation and content controls.</p> | ||
|
|
||
| <sample src="UnsafeWebViewFetchGood.swift" /> | ||
|
|
||
| </example> | ||
| <references> | ||
|
|
||
| <li> | ||
| <a href="https://www.allysonomalley.com/2018/12/03/ios-bug-hunting-web-view-xss/">iOS Bug Hunting - Web View XSS</a>. | ||
| </li> | ||
|
|
||
| </references> | ||
| </qhelp> |
93 changes: 93 additions & 0 deletions
93
unified/ql/src/queries/security/CWE-079/UnsafeWebViewFetch.ql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| /** | ||
| * @name Unsafe WebView fetch | ||
| * @description Fetching data in a WebView without restricting the base URL may allow an attacker to access sensitive local data, or enable cross-site scripting attack. | ||
| * @kind path-problem | ||
| * @problem.severity warning | ||
| * @security-severity 7.8 | ||
| * @precision high | ||
| * @id unified/swift/unsafe-webview-fetch | ||
| * @tags security | ||
| * external/cwe/cwe-079 | ||
| * external/cwe/cwe-095 | ||
| * external/cwe/cwe-749 | ||
| */ | ||
|
|
||
| import unified | ||
|
|
||
| /** | ||
| * A modeled WebView fetch. | ||
| */ | ||
| private class UnsafeWebViewFetchSink extends DataFlow::Node { | ||
| UnsafeWebViewFetchSink() { Models::isSink(this, "webview-fetch") } | ||
|
|
||
| /** | ||
| * Gets a base URL argument of this WebView fetch. | ||
| */ | ||
| DataFlow::Node getABaseUrl() { | ||
| // `result` is a `webview-baseurl` sink that's part of the same | ||
| // call as this `webview-fetch` sink. | ||
| exists(CallExpr call | | ||
| Models::isSink(result, "webview-baseurl") and | ||
| call.getAnArgument().getValue() = this.asExpr() and | ||
| call.getAnArgument().getValue() = result.asExpr() | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * A taint configuration from taint sources to sinks for this query. | ||
| */ | ||
| module UnsafeWebViewFetchConfig implements DataFlow::ConfigSig { | ||
| predicate isSource(DataFlow::Node node) { Models::isSource(node, "remote") } | ||
|
|
||
| predicate isSink(DataFlow::Node node) { node = any(UnsafeWebViewFetchSink sink) } | ||
|
|
||
| Location getASelectedSinkLocation(DataFlow::Node sink) { | ||
| result = sink.getLocation() | ||
| or | ||
| // include the taint source that reaches the base URL, if any | ||
| BaseUrlFlow::flowTo(sink.(UnsafeWebViewFetchSink).getABaseUrl()) | ||
| } | ||
|
|
||
| predicate observeDiffInformedIncrementalMode() { any() } | ||
| } | ||
|
|
||
| module UnsafeWebViewFetchFlow = TaintTracking::Global<UnsafeWebViewFetchConfig>; | ||
|
|
||
| import UnsafeWebViewFetchFlow::PathGraph | ||
|
|
||
| /** | ||
| * A taint configuration from taint sources to base URL arguments of WebView fetches. | ||
| */ | ||
| module BaseUrlConfig implements DataFlow::ConfigSig { | ||
| predicate isSource(DataFlow::Node node) { Models::isSource(node, "remote") } | ||
|
|
||
| predicate isSink(DataFlow::Node node) { node = any(UnsafeWebViewFetchSink sink).getABaseUrl() } | ||
|
|
||
| predicate observeDiffInformedIncrementalMode() { | ||
| none() // only used as secondary configuration | ||
| } | ||
| } | ||
|
|
||
| module BaseUrlFlow = TaintTracking::Global<BaseUrlConfig>; | ||
|
|
||
| from | ||
| UnsafeWebViewFetchFlow::PathNode sourceNode, UnsafeWebViewFetchFlow::PathNode sinkNode, | ||
| UnsafeWebViewFetchSink sink, string message | ||
| where | ||
| UnsafeWebViewFetchFlow::flowPath(sourceNode, sinkNode) and | ||
| sink = sinkNode.getNode() and | ||
| ( | ||
| // no base URL | ||
| not exists(sink.getABaseUrl()) and | ||
| message = "Tainted data is used in a WebView fetch." | ||
| or | ||
| // base URL is nil | ||
| sink.getABaseUrl().asExpr().(BuiltinExpr).getValue() = "nil" and | ||
|
geoffw0 marked this conversation as resolved.
Resolved
|
||
| message = "Tainted data is used in a WebView fetch without restricting the base URL." | ||
| or | ||
| // base URL is also tainted | ||
| BaseUrlFlow::flowTo(sink.getABaseUrl()) and | ||
|
geoffw0 marked this conversation as resolved.
Resolved
|
||
| message = "Tainted data is used in a WebView fetch with a tainted base URL." | ||
| ) | ||
| select sink, sourceNode, sinkNode, message | ||
6 changes: 6 additions & 0 deletions
6
unified/ql/src/queries/security/CWE-079/UnsafeWebViewFetchBad.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| let webview = UIWebView() | ||
|
|
||
| ... | ||
|
|
||
| webview.loadHTMLString(htmlData, baseURL: nil) // BAD |
6 changes: 6 additions & 0 deletions
6
unified/ql/src/queries/security/CWE-079/UnsafeWebViewFetchGood.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| let webview = UIWebView() | ||
|
|
||
| ... | ||
|
|
||
| webview.loadHTMLString(htmlData, baseURL: URL(string: "about:blank")) // GOOD |
88 changes: 88 additions & 0 deletions
88
unified/ql/test/query-tests/security/CWE-079/UnsafeWebViewFetch/UnsafeWebViewFetch.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #select | ||
| | UnsafeWebViewFetch.swift:103:25:103:84 | try! ... | UnsafeWebViewFetch.swift:103:30:103:84 | String(...) | UnsafeWebViewFetch.swift:103:25:103:84 | try! ... | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:106:25:106:28 | data | UnsafeWebViewFetch.swift:105:18:105:72 | String(...) | UnsafeWebViewFetch.swift:106:25:106:28 | data | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:109:25:109:53 | try! ... | UnsafeWebViewFetch.swift:109:30:109:53 | String(...) | UnsafeWebViewFetch.swift:109:25:109:53 | try! ... | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:120:25:120:39 | getRemoteData(...) | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:120:25:120:39 | getRemoteData(...) | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:121:25:121:36 | remoteString | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:121:25:121:36 | remoteString | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:124:25:124:59 | ... + ... | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:124:25:124:59 | ... + ... | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:127:25:127:54 | StringInterpolationExpr | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:127:25:127:54 | StringInterpolationExpr | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:139:25:139:36 | remoteString | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:139:25:139:36 | remoteString | Tainted data is used in a WebView fetch with a tainted base URL. | | ||
| | UnsafeWebViewFetch.swift:167:25:167:39 | getRemoteData(...) | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:167:25:167:39 | getRemoteData(...) | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:168:25:168:36 | remoteString | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:168:25:168:36 | remoteString | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:171:25:171:59 | ... + ... | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:171:25:171:59 | ... + ... | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:174:25:174:54 | StringInterpolationExpr | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:174:25:174:54 | StringInterpolationExpr | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| | UnsafeWebViewFetch.swift:186:25:186:36 | remoteString | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:186:25:186:36 | remoteString | Tainted data is used in a WebView fetch with a tainted base URL. | | ||
| | UnsafeWebViewFetch.swift:210:25:210:32 | htmlData | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:210:25:210:32 | htmlData | Tainted data is used in a WebView fetch without restricting the base URL. | | ||
| edges | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | UnsafeWebViewFetch.swift:117:21:117:35 | getRemoteData(...) | provenance | | | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | UnsafeWebViewFetch.swift:120:25:120:39 | getRemoteData(...) | provenance | | | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | UnsafeWebViewFetch.swift:164:21:164:35 | getRemoteData(...) | provenance | | | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | UnsafeWebViewFetch.swift:167:25:167:39 | getRemoteData(...) | provenance | | | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | UnsafeWebViewFetch.swift:206:17:206:31 | getRemoteData(...) | provenance | | | ||
| | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | provenance | | | ||
| | UnsafeWebViewFetch.swift:103:30:103:84 | String(...) | UnsafeWebViewFetch.swift:103:25:103:84 | try! ... | provenance | | | ||
| | UnsafeWebViewFetch.swift:105:6:105:9 | data | UnsafeWebViewFetch.swift:106:25:106:28 | data | provenance | | | ||
| | UnsafeWebViewFetch.swift:105:18:105:72 | String(...) | UnsafeWebViewFetch.swift:105:6:105:9 | data | provenance | | | ||
| | UnsafeWebViewFetch.swift:109:30:109:53 | String(...) | UnsafeWebViewFetch.swift:109:25:109:53 | try! ... | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:121:25:121:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:124:36:124:47 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:127:34:127:45 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:135:25:135:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:137:25:137:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:139:25:139:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | UnsafeWebViewFetch.swift:141:25:141:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:117:21:117:35 | getRemoteData(...) | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:124:36:124:47 | remoteString | UnsafeWebViewFetch.swift:124:25:124:59 | ... + ... | provenance | | | ||
| | UnsafeWebViewFetch.swift:127:34:127:45 | remoteString | UnsafeWebViewFetch.swift:127:25:127:54 | StringInterpolationExpr | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:168:25:168:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:171:36:171:47 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:174:34:174:45 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:182:25:182:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:184:25:184:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:186:25:186:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | UnsafeWebViewFetch.swift:188:25:188:36 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:164:21:164:35 | getRemoteData(...) | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | provenance | | | ||
| | UnsafeWebViewFetch.swift:171:36:171:47 | remoteString | UnsafeWebViewFetch.swift:171:25:171:59 | ... + ... | provenance | | | ||
| | UnsafeWebViewFetch.swift:174:34:174:45 | remoteString | UnsafeWebViewFetch.swift:174:25:174:54 | StringInterpolationExpr | provenance | | | ||
| | UnsafeWebViewFetch.swift:206:6:206:13 | htmlData | UnsafeWebViewFetch.swift:210:25:210:32 | htmlData | provenance | | | ||
| | UnsafeWebViewFetch.swift:206:6:206:13 | htmlData | UnsafeWebViewFetch.swift:211:25:211:32 | htmlData | provenance | | | ||
| | UnsafeWebViewFetch.swift:206:17:206:31 | getRemoteData(...) | UnsafeWebViewFetch.swift:206:6:206:13 | htmlData | provenance | | | ||
| nodes | ||
| | UnsafeWebViewFetch.swift:94:10:94:37 | try ... | semmle.label | try ... | | ||
| | UnsafeWebViewFetch.swift:94:14:94:37 | String(...) | semmle.label | String(...) | | ||
| | UnsafeWebViewFetch.swift:103:25:103:84 | try! ... | semmle.label | try! ... | | ||
| | UnsafeWebViewFetch.swift:103:30:103:84 | String(...) | semmle.label | String(...) | | ||
| | UnsafeWebViewFetch.swift:105:6:105:9 | data | semmle.label | data | | ||
| | UnsafeWebViewFetch.swift:105:18:105:72 | String(...) | semmle.label | String(...) | | ||
| | UnsafeWebViewFetch.swift:106:25:106:28 | data | semmle.label | data | | ||
| | UnsafeWebViewFetch.swift:109:25:109:53 | try! ... | semmle.label | try! ... | | ||
| | UnsafeWebViewFetch.swift:109:30:109:53 | String(...) | semmle.label | String(...) | | ||
| | UnsafeWebViewFetch.swift:117:6:117:17 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:117:21:117:35 | getRemoteData(...) | semmle.label | getRemoteData(...) | | ||
| | UnsafeWebViewFetch.swift:120:25:120:39 | getRemoteData(...) | semmle.label | getRemoteData(...) | | ||
| | UnsafeWebViewFetch.swift:121:25:121:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:124:25:124:59 | ... + ... | semmle.label | ... + ... | | ||
| | UnsafeWebViewFetch.swift:124:36:124:47 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:127:25:127:54 | StringInterpolationExpr | semmle.label | StringInterpolationExpr | | ||
| | UnsafeWebViewFetch.swift:127:34:127:45 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:135:25:135:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:137:25:137:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:139:25:139:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:141:25:141:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:164:6:164:17 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:164:21:164:35 | getRemoteData(...) | semmle.label | getRemoteData(...) | | ||
| | UnsafeWebViewFetch.swift:167:25:167:39 | getRemoteData(...) | semmle.label | getRemoteData(...) | | ||
| | UnsafeWebViewFetch.swift:168:25:168:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:171:25:171:59 | ... + ... | semmle.label | ... + ... | | ||
| | UnsafeWebViewFetch.swift:171:36:171:47 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:174:25:174:54 | StringInterpolationExpr | semmle.label | StringInterpolationExpr | | ||
| | UnsafeWebViewFetch.swift:174:34:174:45 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:182:25:182:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:184:25:184:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:186:25:186:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:188:25:188:36 | remoteString | semmle.label | remoteString | | ||
| | UnsafeWebViewFetch.swift:206:6:206:13 | htmlData | semmle.label | htmlData | | ||
| | UnsafeWebViewFetch.swift:206:17:206:31 | getRemoteData(...) | semmle.label | getRemoteData(...) | | ||
| | UnsafeWebViewFetch.swift:210:25:210:32 | htmlData | semmle.label | htmlData | | ||
| | UnsafeWebViewFetch.swift:211:25:211:32 | htmlData | semmle.label | htmlData | | ||
| subpaths |
3 changes: 3 additions & 0 deletions
3
unified/ql/test/query-tests/security/CWE-079/UnsafeWebViewFetch/UnsafeWebViewFetch.qlref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| query: queries/security/CWE-079/UnsafeWebViewFetch.ql | ||
| postprocess: | ||
| - utils/test/InlineExpectationsTestQuery.ql |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.