Class SecretRedactor

java.lang.Object
io.jenkins.plugins.changeinvestigator.evidence.SecretRedactor

public final class SecretRedactor extends Object
Best-effort redaction of common secret patterns from log text before it is ever included in an evidence bundle or sent to an AI provider.

This redaction is not, and cannot be, exhaustive or guaranteed. It catches well-known, high-signal patterns (bearer tokens, common cloud provider key formats, private key blocks, obvious "password=" / "token=" assignments). Administrators are responsible for reviewing what data reaches an external AI provider before enabling it - see SECURITY.md.

  • Method Details

    • redact

      public static String redact(String line)
      Applies all redaction rules to a single line and returns the (possibly modified) result.
    • redactMultiline

      public static String redactMultiline(String text)
      Applies redactions that span multiple lines (currently: PEM private key blocks) to a full block of already-joined text. Callers should still call redact(String) per line for the single-line patterns.