From ef5c75954b82b2bf7a49ba147bd192f97f04d143 Mon Sep 17 00:00:00 2001 From: SDNick484 Date: Tue, 10 Nov 2026 14:16:28 -0800 Subject: [PATCH] test_logsafe: placeholders a sibling's privacy scan accepts mcp-server-steam-backlog's CI runs a privacy scan over its files, and its sync to 9449e9f failed on two values in the rendered test_logsafe.py: mail.example.co.uk (only example.com/.org/.net, .test and .invalid count as placeholders) and the 0.0.0.1 in a comment's ::ffff:0.0.0.1 (only loopback, documentation and RFC 1918 IPv4 do). Swap them for mail.example.org and ::ffff:127.0.0.1; both tests still cover what they did. Refs #16 Co-Authored-By: Claude Opus 5.5 --- templates/tests/test_logsafe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/tests/test_logsafe.py b/templates/tests/test_logsafe.py index ef8c660..3b34a66 100644 --- a/templates/tests/test_logsafe.py +++ b/templates/tests/test_logsafe.py @@ -204,7 +204,7 @@ def test_mask_email(): ("line", "expected"), [ ("denied: user@example.com", "denied: u***@example.com"), - ("from=first.last+tag@mail.example.co.uk,", "from=f***@mail.example.co.uk,"), + ("from=first.last+tag@mail.example.org,", "from=f***@mail.example.org,"), ("", ""), ("send to user@example.com.", "send to u***@example.com."), ("user@example.com: not allowed", "u***@example.com: not allowed"), @@ -289,7 +289,7 @@ def test_no_ipv4_survives_redact(pre, ip, post): @hypothesis.given(st.ip_addresses(v=6), st.text(alphabet="abcxyz ,.;", max_size=8)) def test_no_ipv6_survives_redact(ip, around): hypothesis.assume(not (ip.is_loopback or ip.is_unspecified)) - # A dotted tail of 0.x or 127.x ("::ffff:0.0.0.1") is kept on purpose, as the bare 0.x and + # A dotted tail of 0.x or 127.x ("::ffff:127.0.0.1") is kept on purpose, as the bare 0.x and # 127.x addresses are (test_no_ipv4_survives_redact makes the same assumption). hypothesis.assume(not str(ip).rsplit(":", 1)[1].startswith(("127.", "0."))) assert str(ip) not in redact(f"{around} {ip} {around}")