Find Android-specific security smells

Proprietary

Deprecated world-readable/writeable file modes, WebView JavaScript enablement and addJavascriptInterface exposure, plaintext SharedPreferences for sensitive data, and implicit Intent broadcasts that any app on the device can intercept.

org.openrewrite.kotlin.security.FindAndroidSecuritySmells$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.security.FindAndroidSecuritySmells$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find MODE_WORLD_READABLE references
  2. Find WebView.settings.javaScriptEnabled = true / setJavaScriptEnabled(true)
  3. Find WebView.addJavascriptInterface(...) calls
  4. Find getSharedPreferences(_, MODE_PRIVATE) callers
  5. Find Intent("some.implicit.action") constructions
  6. Find WebView.loadUrl("http://...") calls
  7. Find WebView.settings.mixedContentMode = MIXED_CONTENT_ALWAYS_ALLOW settings
  8. Find WebView.settings.setAllowFileAccessFromFileURLs(true) calls
  9. Find WebView.settings.setSavePassword(true) calls