From dc367035ce80031aadca7f55741b1c4edacaa945 Mon Sep 17 00:00:00 2001 From: "ilblackdragon@gmail.com" Date: Mon, 23 Mar 2026 21:44:46 -0700 Subject: [PATCH] fix(safety): demote leak detector warn-action logs from warn! to debug! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The leak detector's Warn-action matches (high_entropy_hex pattern on web search results containing commit SHAs, CSS colors, URL hashes) were logging at warn! level, corrupting the REPL UI with lines like: WARN Potential secret leak detected pattern=high_entropy_hex preview=a96f********cee5 These are informational false positives — real leaks use LeakAction::Redact which silently modifies the content. Warn-action matches only log for debugging purposes and should not appear in production output. Changed to debug! level — visible with RUST_LOG=ironclaw_safety=debug. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ironclaw_safety/src/leak_detector.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ironclaw_safety/src/leak_detector.rs b/crates/ironclaw_safety/src/leak_detector.rs index fe1a5bdc..87577cf2 100644 --- a/crates/ironclaw_safety/src/leak_detector.rs +++ b/crates/ironclaw_safety/src/leak_detector.rs @@ -273,10 +273,12 @@ impl LeakDetector { }); } - // Log warnings + // Log warn-action matches at debug level (not warn!) to avoid + // corrupting REPL/TUI output. These are informational — real leaks + // use LeakAction::Redact which modifies the content silently. for m in &result.matches { if m.action == LeakAction::Warn { - tracing::warn!( + tracing::debug!( pattern = %m.pattern_name, severity = %m.severity, preview = %m.masked_preview,