Restore full environment controls and original match pacing for 0.1.2 (by Codex)
Build without game data / build (windows-x64, windows-2022) (push) Canceled after 0s
Build without game data / build (macos-arm64, macos-14) (push) Canceled after 0s
Build without game data / build (linux-x64, ubuntu-24.04) (push) Canceled after 0s
Prepare release packages / build (push) Canceled after 0s
Prepare release packages / draft (push) Canceled after 0s

This commit is contained in:
Codex committed 2026-10-17 21:09:38 +02:00
1 parent 4fb8b2f551
commit 310e3e2464
30 files changed
+422 -383

No files matched your search

+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)
# Resolution-qualified artwork names are filenames, including in older commits.
SIZED_ASSET_NAME = re.compile(r"[A-Z0-9._+-]+@[1-9][0-9]{0,4}\.(?:png|jpe?g|webp|svg|gif|avif)", 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)
@@ -187,7 +189,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() not in BOT_EMAILS:
if match.group().lower() not in BOT_EMAILS and not SIZED_ASSET_NAME.fullmatch(match.group()):
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))
+6
View File
@@ -20,6 +20,12 @@ class BlobChecks(unittest.TestCase):
def rules(self, name, text):
return {finding.rule for finding in guard.scan_blob(name, text.encode())}
def test_resolution_asset_names_are_not_personal_emails(self):
for filename in ["crest@128.png", "icon@64.svg", "photo@1024.webp"]:
self.assertNotIn("personal-email", self.rules("docs/formats/EXAMPLE.md", filename))
for address in ["person@" + "128.example.org", "person@" + "abc.png", "person@" + "example.org"]:
self.assertIn("personal-email", self.rules("README.md", address))
def test_legacy_names_without_english_word_false_positives(self):
self.assertIn("legacy-address-symbol", self.rules("src/a.cpp", "FUN" + "_00012345();"))
self.assertIn("legacy-address-symbol", self.rules("src/a.cpp", "raw_" + "ba384"))