Skip to content

Android - Code Pathfinder Atlas

Browse our specialized collection of Android security rules designed to help you write better, more secure Android applications.

Test Locally

To run these rules against your Android codebase:

Terminal window
codepathfinder ci --project /src/project --ruleset cpf/android

Rules (5)

WebView JavaScript Enabled

Rule ID: java/android/webview-javascript-enabled
Severity: Medium | CWE: 079
Enabling JavaScript execution in a WebView can result in cross-site scripting attacks.

WebView JavaScript Interface

Rule ID: java/android/webview-javascript-interface
Severity: Medium | CWE: 079
Enabling addJavascriptInterface exposes java methods to JavaScript.

WebView Content Access

Rule ID: java/android/webview-set-allow-content-access
Severity: Medium | CWE: 079
Enabling setAllowContentAccess enables content:// access from webpages.

WebView File Access

Rule ID: java/android/webview-set-allow-file-access
Severity: Medium | CWE: 079
Enabling setAllowFileAccess enables webview access to file:/// URLs.

WebView File URL Access

Rule ID: java/android/webview-set-allow-file-access-from-file-urls
Severity: Medium | CWE: 079
Enabling setAllowFileAccessFromFileURLs leaks sandbox access to file:/// URLs.

For more information on using Code PathFinder with Android, see our documentation.