Skip to content

Debug builds log full plugin methodData (incl. credentials) to logcat #8652

Open

Description

@rubenperezrial

Problem: in debuggable builds, the native bridge logs every plugin call's full payload. Bridge.java (callPluginMethod, ~832-843) does Logger.verbose("callback: ... methodData: " + call.getData()), enabled by Logger + CapConfig.loggingBehavior (default debug → on when the app is debuggable). The JS bridge (native-bridge.js, createLogFromNative/createLogToNative → c.dir(...)) mirrors it for results. Plugins that carry secrets (e.g. biometric credential storage, secure token storage) end up printing credentials verbatim to logcat.

Repro (any debug build, e.g. a biometric/token plugin):

  • adb logcat shows V Capacitor: callback: <id>, pluginId: <plugin>, methodName: setCredentials, methodData: {"username":"...","password":"<secret material>"}
  • Capacitor/Console shows the result: Msg: {"password":"{...access/refresh tokens...}"}

Impact: debug-only (release unaffected) — but devs run debug builds against real accounts, and logcat is readable via adb and captured in bug reports.

Suggestion: redact/omit methodData (and results) by default, or add a redaction option. loggingBehavior: 'none' disables ALL bridge logs, which removes useful debugging signal — a targeted redaction (e.g. keys like password/token/secret, or truncation) would be better.

Versions: @capacitor/core 8.5.2, @capacitor/android 8.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions