Repository navigation
fix(leak-gate): exempt maintainer's mail-domain address in message scope - #5
Merged
Merged
Conversation
added 3 commits
August 17, 2026 21:43
GitHub's squash-merge writes a Co-authored-by trailer carrying the maintainer's address onto the merge commit (seen on #1's merge, c95abce). That address already sits in the author/committer header of every commit here by the same deliberate, standing decision that exempts his first name in message scope (principal-first-name, above): denying in a trailer what the header of the same commit states outright is theatre. Stays fully enforced over file content, where no such decision covers an address pasted into a doc or fixture.
Review feedback (independent model-diverse pass, 2026-08-17): the previous fix set messageExempt: true on company-email-address wholesale, which suppressed the rule for every address on the domain in every message shape, not just the one pre-approved instance (the maintainer's GitHub-generated Co-authored-by trailer). That's a materially broader PII hole than the principal-first-name precedent it was modelled on, since a domain-wide rule covers more than one person's identity. Adds messageExemptPattern: a narrower, anchored allow-pattern checked only when the rule's own pattern already matched. Only the maintainer's exact, known Co-authored-by trailer shape is skipped; any other address on the domain, or this same address in a different message shape, still fires. Verified with a probe commit carrying a different employee's address in the same trailer position, which still trips the rule.
…tion shape Review feedback: --self-test exercised content, filename and binary-sniff scanning, but never scanMessages or the exemption semantics, so the new messageExemptPattern boundary could regress while self-test stayed green. Pulls the per-line matching logic out of scanMessages into scanMessageLine so it's directly testable without a real commit, then pins three cases built from fragments (never the literal string, per this file's own convention): the approved trailer shape is skipped, the same address outside that shape still fires, and a different address in the same trailer shape still fires.
simon-inkie
commented
Aug 17, 2026
Owner
Author
There was a problem hiding this comment.
Independent review outcome: clean after follow-up through e83c593. The original whole-rule message exemption was correctly replaced by an anchored exemption for the exact approved trailer shape. Production matching and self-test coverage share scanMessageLine, with regression cases proving the approved trailer is skipped while the same address in prose and another company address in the same trailer shape still fire. My earlier objection is fully resolved. I would approve this change, but GitHub prevents the currently authenticated PR-author account from self-approving.
…tainer-email-in-messages
simon-inkie
added a commit
that referenced
this pull request
Aug 18, 2026
…ope (#5) * fix(leak-gate): exempt maintainer's mail-domain address in message scope GitHub's squash-merge writes a Co-authored-by trailer carrying the maintainer's address onto the merge commit (seen on #1's merge, e6e400d). That address already sits in the author/committer header of every commit here by the same deliberate, standing decision that exempts his first name in message scope (principal-first-name, above): denying in a trailer what the header of the same commit states outright is theatre. Stays fully enforced over file content, where no such decision covers an address pasted into a doc or fixture. * fix(leak-gate): narrow the email exemption to the exact trailer shape Review feedback (independent model-diverse pass, 2026-08-17): the previous fix set messageExempt: true on company-email-address wholesale, which suppressed the rule for every address on the domain in every message shape, not just the one pre-approved instance (the maintainer's GitHub-generated Co-authored-by trailer). That's a materially broader PII hole than the principal-first-name precedent it was modelled on, since a domain-wide rule covers more than one person's identity. Adds messageExemptPattern: a narrower, anchored allow-pattern checked only when the rule's own pattern already matched. Only the maintainer's exact, known Co-authored-by trailer shape is skipped; any other address on the domain, or this same address in a different message shape, still fires. Verified with a probe commit carrying a different employee's address in the same trailer position, which still trips the rule. * test(leak-gate): pin the message-scope exemption's narrow-by-construction shape Review feedback: --self-test exercised content, filename and binary-sniff scanning, but never scanMessages or the exemption semantics, so the new messageExemptPattern boundary could regress while self-test stayed green. Pulls the per-line matching logic out of scanMessages into scanMessageLine so it's directly testable without a real commit, then pins three cases built from fragments (never the literal string, per this file's own convention): the approved trailer shape is skipped, the same address outside that shape still fires, and a different address in the same trailer shape still fires. --------- Co-authored-by: Simon <simon@inkie.ink>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan