Accept project bot addresses in the public history check

The co-author trailer and the Claude project identity are bot addresses,
not personal data; the check only accepted the Codex identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-16 22:00:56 +02:00
1 parent baa3562eab
commit 54831b8b2d
1 file changed
+3 -1
+3 -1
View File
@@ -65,6 +65,8 @@ SECRET_PATTERNS = (
re.compile(r"(?m)^(?:export\s+)?[A-Z_]*(?:TOKEN|PASSWORD|SECRET|API_KEY)\s*=\s*[A-Za-z0-9_./+-]{20,}(?:\s|$)"),
)
EMAIL = re.compile(r"\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b", re.IGNORECASE)
# Project bot identities and the co-author trailer address are not personal data.
BOT_EMAILS = {"codex@openbmh.invalid", "claude@openbmh.invalid", "noreply@anthropic.com"}
HEX_NUMBER = re.compile(r"\b0x(?P<digits>[0-9a-f]{5,8})(?:u(?:ll?|z)?|ll?u?|z)?\b", re.IGNORECASE)
LAYOUT_BEGIN = 0x50000
LAYOUT_END = 0xE0000
@@ -185,7 +187,7 @@ def scan_blob(name: str, blob: bytes) -> list[Finding]:
for match in pattern.finditer(text):
result.append(Finding(name, line_at(text, match.start()), rule))
for match in EMAIL.finditer(text):
if match.group().lower() != "codex@openbmh.invalid":
if match.group().lower() not in BOT_EMAILS:
result.append(Finding(name, line_at(text, match.start()), "personal-email"))
if PurePosixPath(name).suffix.lower() in SOURCE_SUFFIXES:
result.extend(layout_findings(name, text))