From c7fe5fc88d6b8bdcc40954abea89ea70f5d9eff1 Mon Sep 17 00:00:00 2001 From: Dipesh Mittal Date: Mon, 2 Nov 2026 13:00:14 +0530 Subject: [PATCH] Redact IPv4 addresses that end a sentence The IP rule rejected any match followed by ".", so "from 10.20.3.14." kept the address. Only "." now blocks a match, which still leaves longer dotted numbers such as "1.2.3.4.5" alone. Co-Authored-By: Claude Opus 5.5 --- src/hindsight/redaction.py | 3 ++- tests/core/test_core.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hindsight/redaction.py b/src/hindsight/redaction.py index b049246..ec0328b 100644 --- a/src/hindsight/redaction.py +++ b/src/hindsight/redaction.py @@ -42,7 +42,8 @@ def __init__(self, rules_path=None): r"|(?:customer|cust|tenant)(?:[ _-]?id)?(?:\s*[:=#]\s*|\s+)" r"(?=[A-Za-z0-9-]*\d)[A-Za-z0-9-]{4,})\b", ), - ("ip", r"(?" means a longer dotted number. + ("ip", r"(?