Skip to content

Prevent sensitive data from leaking to iOS console in Release builds#21

Merged
dadachi merged 2 commits intomainfrom
secure-console-logs
Mar 25, 2026
Merged

Prevent sensitive data from leaking to iOS console in Release builds#21
dadachi merged 2 commits intomainfrom
secure-console-logs

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Mar 25, 2026

Summary

  • Replace print() calls with os.Logger using privacy-aware formatting in Failure and Event loggers — failure reasons are marked .private so they're redacted in Release builds
  • Wrap remaining print() calls in #if DEBUG guards across LoginRepository, SignUpRepository, KeychainStore, NFCManager, and Utility to prevent sensitive data (credentials, tag payloads, keychain contents) from appearing in the iOS console on production devices

Test plan

  • Build in Release configuration and verify no sensitive data appears in Console.app
  • Build in Debug configuration and verify print() and os.Logger output still works for development
  • Verify login, sign-up, NFC write, and tag scan flows still function correctly

🤖 Generated with Claude Code

dadachi and others added 2 commits March 25, 2026 15:26
Migrate Failure/Event logging to os.Logger with .private sensitivity for
PII fields, and wrap all remaining print() calls with #if DEBUG guards to
strip keychain data, NFC tag IDs, and error details from Release builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit ac5a19d into main Mar 25, 2026
2 checks passed
@dadachi dadachi deleted the secure-console-logs branch March 25, 2026 08:09
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