Skip to content

fix: scrub sensitive values from logcat + gate logs behind BuildConfig.DEBUG - #12

Open
jguillaumesio wants to merge 1 commit into
mainfrom
scrub-logcat-secrets
Open

fix: scrub sensitive values from logcat + gate logs behind BuildConfig.DEBUG#12
jguillaumesio wants to merge 1 commit into
mainfrom
scrub-logcat-secrets

Conversation

@jguillaumesio

Copy link
Copy Markdown
Owner

Summary

  • Redact target number (asterisks) in all log statements
  • Redact expected code value, log only its length
  • Redact trigger key in logs
  • Wrap all Log.d calls in BuildConfig.DEBUG guard so they are stripped from release builds
  • Incoming call number redacted in logcat

Why

Sensitive values (intercom number, door code) were being logged in plaintext via Log.d. On a rooted device or via adb logcat, anyone could read them. The app controls physical access to your home — leaking these in logs is a real security issue.

Changes

  • IntercomModule.kt: All Log.d calls now wrapped in if (BuildConfig.DEBUG) blocks
  • Sensitive values replaced with asterisks or length-only hints
  • Log.e calls (error handling) preserved since they do not leak secrets

Test plan

  • Build release APK and verify no sensitive values in logcat
  • Build debug APK and verify redacted logs still appear
  • Verify app functionality is unchanged (no behavioral changes)

…g.DEBUG

- Redact target number (asterisks) in all log statements
- Redact expected code value, log only its length
- Redact trigger key in logs
- Wrap all Log.d calls in BuildConfig.DEBUG guard so they are stripped from release builds
- Incoming call number redacted in logcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant