8000 fix(leak-gate): exempt maintainer's mail-domain address in message scope by simon-inkie · Pull Request #5 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

fix(leak-gate): exempt maintainer's mail-domain address in message scope - #5

Merged
simon-inkie merged 4 commits into
mainfrom
leak-gate/exempt-maintainer-email-in-messages
Aug 18, 2026
Merged

simon-inkie merged 4 commits into
mainfrom
leak-gate/exempt-maintainer-email-in-messages

Conversation

@simon-inkie
Copy link
Copy Markdown
Owner

Summary

  • `node scripts/leak-gate.mjs --messages` on `main` flags a real finding: PR docs: add CLAUDE.md, branch + PR workflow from here on #1's GitHub squash-merge commit (c95abce) carries `Co-authored-by: Simon simon@inkie.ink` in its body.
  • Same fact, same precedent as the existing `principal-first-name` message-scope exemption just above it: the maintainer's identity is already in the author/committer header of every commit, by a standing decision. Denying it in a trailer is theatre.
  • Adds `messageExempt: true` to `company-email-address`, stays fully enforced over file content.

Test plan

  • `--self-test`: all 30 rules fire
  • Working-tree scan: clean
  • `--messages` on this branch: the c95abce finding is gone

Simon 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 simon-inkie left a comment
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@simon-inkie
simon-inkie merged commit 78d0b1f into main Aug 18, 2026
4 checks passed
@simon-inkie
simon-inkie deleted the leak-gate/exempt-maintainer-email-in-messages branch August 18, 2026 15:27
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0