Fluxion::Executor::Redaction::StreamingSanitizer
Keeps a multi-line private key masked across separate output lines.
Process output arrives a line at a time, so a PEM block spans many calls and the single-line patterns would only ever see base64 that looks like noise. This tracks whether it is inside a key block, and carries a partial marker across the boundary.
Constants
BEGIN_MARKER = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/i
END_MARKER = /-----END [A-Z0-9 ]*PRIVATE KEY-----/i
MAX_CARRY = 128
A marker split across a read must still be recognised, but an unbounded carry would let a stream with no newline consume memory forever.