/security-agent-skills:auditing-mobile-webview-bridge-exposurefrom security-agent-skills
Audits mobile WebView bridges where native methods are exposed to JavaScript, identifying when untrusted web content can invoke privileged app capabilities.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A mobile app that embeds a WebView often gives the web content a way to call back into native code: a bridge that exposes native methods to JavaScript so the page can use the camera, read files, fetch tokens, or drive app features. That bridge is safe only when the content on the other side is trusted and confined, content the app authored, loaded from an origin it controls, over a channel that cannot be tampered with. It becomes an exposure when untrusted content reaches the bridge: a remote page the app loads, a third-party frame inside it, a link the WebView follows to an attacker origin, or content injected over an insecure channel. Then web script the app did not author invokes native methods and acts with the app's privileges. The bug is a native capability reachable from web content the app does not fully trust, whether because the bridge is exposed to untrusted origins, the WebView loads content it should not, or the bridge methods trust any caller. You audit these by tracing which content can reach the bridge and what each exposed method does.
Audit WebView bridges only on apps you own or are authorized to assess, on test devices and accounts, driving the bridge with benign content you control rather than acting against real data. A confirmed exposure lets web content wield native privilege, so keep every probe within scope. If you can't name the authorization, stop.
Establish which content can actually reach the bridge and whether the methods check the caller first. For each exposed native interface, determine whether only trusted, app-authored content loaded from a controlled origin over a secure channel can reach it, or whether remote content, a third-party frame, a followed link, or injected content can, and whether each bridge method verifies the calling origin. This is the false-positive killer: a bridge reachable only by trusted confined content, or one whose methods authorize the caller, is not driven by an attacker even though it exposes native capability. Name the untrusted content path before crafting a call.
Enumerate the exposed native methods. List the methods the bridge exposes to JavaScript and what each does: privileged actions, data reads, capability access, or navigation. Note which are sensitive enough that web script invoking them would matter.
Map what content can reach the bridge. Determine what the WebView loads and whether it is confined to a controlled origin: does it load remote pages, allow third-party frames, follow links to arbitrary origins, or load content over a channel an attacker can tamper with. Any untrusted content that runs script in the WebView can reach an exposed bridge.
Check the origin and caller restriction. Determine whether the bridge is exposed only to trusted origins and whether each method verifies the caller before acting, or whether the interface is available to whatever content runs in the WebView and the methods trust any caller. A method that acts for any origin is the exposure.
Check the content-loading confinement. Determine whether the WebView restricts navigation to the app's own origins, blocks mixed and insecure content, and isolates any third-party frame from the bridge, or whether untrusted content can be loaded into the same context that holds the interface.
Confirm and record. Confirm by loading benign untrusted content you control into the WebView, through a
followed link, a frame, or a tampered channel, and invoking a sensitive native method from that content on
a test device. Kill the lead if only trusted confined content reaches the bridge, if each method authorizes
the calling origin, and if navigation and framing are restricted to controlled origins. Record the method,
the untrusted content path, the missing check, and the invocation observed, or set a kill_reason.
Confirm. A WebView exposes a native method that returns an authentication token and follows links to arbitrary origins. Navigating the WebView to a benign attacker-controlled page over a followed link lets that page's script invoke the method and receive the token, on a test device with a test account. Confirmed native capability reachable from untrusted web content,
high, remediation = expose the bridge only to app-authored content on a controlled origin, verify the calling origin in each native method, restrict WebView navigation and framing to controlled origins, and block insecure and mixed content.Kill. The same WebView loads only app-authored content from a controlled origin over a secure channel, restricts navigation so links to other origins open outside the bridge context, isolates third-party frames from the interface, and each native method verifies the calling origin before acting. No untrusted content reaches the bridge. Killed,
kill_reason= "the bridge is reachable only by trusted confined content on a controlled origin and every method authorizes the caller; untrusted web content cannot invoke a native method."
You need every native method the bridge exposes, what each does, and whether it verifies the calling origin, plus what the WebView loads and whether navigation, framing, and content security confine it to controlled origins. For each exposed method, decide whether untrusted content can reach it through a remote page, a frame, a followed link, or a tampered channel. Reading the bridge exposure and the WebView's loading policy settles most leads; loading benign untrusted content you control and invoking a sensitive method on a test device settles the rest.
auditing-mobile-deeplink-trust - a deep link that drives the WebView to load attacker content is one way
untrusted content reaches the bridge, joining link trust to bridge exposure.testing-postmessage-and-web-message-trust - a bridge reached through cross-frame messaging shares the
origin-verification failure that skill treats in the pure-web setting.hunting-mobile-tls-pinning-and-trust-gaps - content loaded over a channel an attacker can tamper with
reaches the bridge, the transport-trust gap that skill covers.auditing-electron-ipc-trust - the desktop analogue, where a renderer bridges to native capability and the
same caller-authorization question applies.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job