-
Notifications
You must be signed in to change notification settings - Fork 46
[SDL Assessment task] Secure webview settings, Fixes AB#3288572 #2715
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
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
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.
Pull Request Overview
This PR implements security hardening for WebView settings in the OAuth2 authorization flow as part of an SDL (Security Development Lifecycle) assessment task. The changes disable various file access permissions to prevent potential security vulnerabilities.
Key changes:
- Refactored WebSettings variable naming for consistency and reuse
- Added security settings behind a feature flag to disable file access capabilities
- Applied defensive security measures to prevent unauthorized file system access from WebView
...va/com/microsoft/identity/common/internal/providers/oauth2/WebViewAuthorizationFragment.java
Show resolved
Hide resolved
|
✅ Work item link check complete. Description contains link AB#3288572 to an Azure Boards work item. |
a9eff9c to
1c5ca62
Compare
SDL assessment task : https://securityassurance.visualstudio.com/Threat%20Modeling/_workitems/edit/80425
As per above SDL assessment task, we have secure some input settings in webview
WebSettings settings = webView.getSettings();
settings.setAllowFileAccess(false);
settings.setAllowContentAccess(false);
settings.setAllowFileAccessFromFileURLs(false); // Requires API 16+
settings.setAllowUniversalAccessFromFileURLs(false); // Requires API 16+
Keeping the changes behind a flight which will be true only in brokered flow for now https://github.com/AzureAD/ad-accounts-for-android/pull/3168
Fixes AB#3288572