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
Java: Android WebView Content Access Query #11283
base: main
Are you sure you want to change the base?
Java: Android WebView Content Access Query #11283
Conversation
|
QHelp previews: java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsContentAccess.qhelpAndroid WebSettings content accessAndroid can provide access to content providers within a WebView using the Allowing access to content providers via RecommendationIf your app does not require access to the ExampleIn the following (bad) example, access to WebSettings settings = webview.getSettings();
settings.setAllowContentAccess(true);References
|
Hey @egregius313, I added a couple comments. Let's review this again once you've considered those and completed the qhelp. Also, this needs a change note.
|
|
||
| from MethodAccess ma | ||
| where | ||
| ma.getMethod() instanceof AllowContentAccessMethod and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is enabled by default, right? I think the query should take that into consideration and use dataflow to identify WebSettings instances that don't set this to false explicitly.
| * @id java/android-websettings-content-access | ||
| * @problem.severity warning | ||
| * @security-severity 6.5 | ||
| * @precision high |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this won't always be a security problem, let's get this down to medium so that the query becomes opt-in for users that want to see more results.


Added a query for
WebSettings#setAllowContentAccess, which can expose sensitive information.