bedkillerspacex-boop/codex-skill-library/android-webview-security

Claude Code and agent skill by bedkillerspacex-boop/codex-skill-library

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Authorized Android WebView security review: JavaScript bridges (addJavascriptInterface), file URL access, universal access from file URLs, mixed content, SSL error handlers, and WebView XSS to native privilege. Use when reviewing owned apps, labs, and CTF APKs — not unauthorized third-party apps.

Install

npx vskill@latest install bedkillerspacex-boop/codex-skill-library/android-webview-security

SKILL.md

The same SKILL.md was published earlier as bedkillerspacex-boop/codex-skill-library/android-webview-security.

Android WebView Security

Scope And Authorization

  • In scope: Owned apps, labs, CTFs, authorized assessments.
  • Out of scope: Attacking third-party WebViews without permission.
  • XSS in WebView can become native RCE-class impact via bridges — handle evidence carefully.
  • Pair with android-intent-security and code-quality-standards.

When To Use

  • App embeds WebView for content, SSO, payments, or hybrid UI.
  • Reviewing addJavascriptInterface and @JavascriptInterface methods.
  • file:// origins, mixed content, or onReceivedSslError proceeding.
  • Token leakage via WebView caches/cookies.

Do Not Use As Primary

NeedSkill instead
General exported componentsandroid-exported-components
Full mobile pentest hubandroid-pentesting-tricks
Classic web XSS onlyxss-cross-site-scripting
Implementation quality baselinecode-quality-standards

Domain Focus

Setting / APISafe default direction
setJavaScriptEnabledOnly if required
addJavascriptInterfaceMinimal surface; validate origin
setAllowFileAccessfalse unless required
setAllowFileAccessFromFileURLsfalse
setAllowUniversalAccessFromFileURLsfalse (dangerous)
Mixed contentNever allow insecure on HTTPS pages
SSL errorsDo not handler.proceed()
CookiesSecure, HttpOnly where applicable; clear on logout

Workflow

1. Confirm scope and success criteria
  1. Map each WebView: URL allowlist, JS on/off, bridges, file access.
  2. Success: no sensitive bridge methods reachable from untrusted content; SSL errors fail closed; file universal access off.
  3. Threat: XSS in loaded content + malicious intent loading URL.
2. Static inventory
bash
jadx -d out app.apk
rg -n "WebView|addJavascriptInterface|setJavaScriptEnabled|setAllowFileAccess|onReceivedSslError|shouldOverrideUrlLoading" out/

Build table: WebView class → settings → interfaces → URL sources.

3. Bridge review
java
// High risk pattern
webView.addJavascriptInterface(new Bridge(), "Android");
// Bridge methods become JS-callable when annotated
CheckAction
Method sensitivityNo raw filesystem, no arbitrary intents, no auth tokens return
OriginVerify WebView URL host allowlist before privileged ops
minSdkHistorical CVE for unannotated methods on old Android — know your minSdk
InputTreat all JS args as untrusted
4. Navigation and URL loading
kotlin
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest): Boolean {
val host = request.url.host ?: return true
if (host !in allowlist) return true // block
return false
}
// Never load intent.getStringExtra("url") without allowlist
5. TLS and mixed content
kotlin
// Bad
override fun onReceivedSslError(view: WebView, h: SslErrorHandler, e: SslError) {
h.proceed()
}
// Good: h.cancel(); show error UI
webSettings.mixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW
6. Dynamic tests (authorized)
bash
# Load lab XSS page if WebView points to controllable content
# Frida/hooks only on owned builds to inspect bridge
adb logcat | rg -i webview
  1. Attempt javascript: URLs if app loads untrusted intents.
  2. Check cookie theft via XSS if JS enabled.
7. Remediate and verify
  1. Disable unused JS/file access; shrink bridge API.
  2. Prefer Chrome Custom Tabs for external content when embedding not required.
  3. Clear WebView data on logout: clearCache, cookie manager remove.

Good / Bad

TopicGoodBad
ContentHTTPS allowlistAny URL from Intent
BridgeFew methods + origin checksexec(cmd) bridge
SSLCancel on errorproceed always
FilesNo universal file accesssetAllowUniversalAccessFromFileURLs(true)

Output Checklist

  • [ ] All WebViews inventoried
  • [ ] JS/file/mixed/SSL settings reviewed
  • [ ] Bridges origin-checked and minimized
  • [ ] URL loading allowlisted
  • [ ] SSL error handler safe
  • [ ] Dynamic tests on owned builds
  • [ ] Logout clears session data
  • [ ] code-quality-standards applied

Rules

  • Authorized apps only.
  • Untrusted web content + bridge = high severity until proven otherwise.
  • Never ignore SSL errors in WebView.
  • Prefer system browser for arbitrary URLs.
  • Redact tokens found in WebView storage.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bedkillerspacex-boop/codex-skill-library/android-webview-security/badge)](https://verified-skill.com/skills/bedkillerspacex-boop/codex-skill-library/android-webview-security)

Something wrong with this skill or its page? Tell us.