The error logs were full of private data. Every email address sat exposed like a target. You could strip them clean, or your air-gapped system would age into a security risk.
Masking email addresses in logs inside an air-gapped environment is not optional. It is a core part of maintaining compliance and protecting user privacy. Logs can leak. Even without internet access, air-gapped systems get audited, exported, or integrated with outside tools. If raw emails remain, they create a permanent trail that can be copied or mishandled.
The process is simple, but requires discipline.
First, identify all logging points where user emails might be written. Trace the code path into third-party libraries and internal utilities. Many logging frameworks allow custom formatters or filters—use those to intercept email addresses before they are written.
Regex-based masking works well when combined with normalization. Match patterns for user@example.com and replace with either partial masking (u***@example.com) or fully anonymized IDs. Store mapping in a secure local table if you need reversibility, but avoid persisting raw addresses.