Skip to content
vetkitChecksChangelogDocumentation

vetkit.kotlin.android.webview-javascript-interface

A JavaScript bridge is added to a WebView with JavaScript enabled; any page it loads can call the exposed methods.

Last updated:

Suite: Security

kotlin

A JavaScript bridge is added to a WebView with JavaScript enabled; any page it loads can call the exposed methods.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Only load trusted, HTTPS content in WebViews that expose a JavaScript interface, keep the exposed @JavascriptInterface methods minimal, or use WebViewCompat.addWebMessageListener with an origin allow-list.

References

Source: packages/engine/rules/sast/kotlin.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.