Skip to content

ci: block the maintainer's address, leave contributors' alone - #70

Merged
jothimani-rajendran merged 1 commit into
mainfrom
ci/no-email-leaks
Sep 9, 2026
Merged

ci: block the maintainer's address, leave contributors' alone#70
jothimani-rajendran merged 1 commit into
mainfrom
ci/no-email-leaks

Conversation

@jothimani-rajendran

@jothimani-rajendran jothimani-rajendran commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

What

The "Scan commit messages for local or personal data" job matched five consumer domains — @gmail, @yahoo, @hotmail, @outlook, @protonmail. A contributor at a corporate or self-hosted domain passed straight through, and so did an address pasted into a commit body from a log excerpt or a quoted report, which is how one actually arrives by accident.

Three rules replace that blocklist:

  1. A sign-off trailer may carry any address. Signed-off-by, Co-Authored-By, Reported-by, Reviewed-by, Tested-by and Acked-by are exempt. DCO sign-off is somebody's own attestation — their address there is their choice, not a leak, and blocking it would turn a privacy check into a barrier to contributing.
  2. Anywhere else in the message, an address is rejected. That is the accidental case.
  3. The maintainer's own personal address is rejected everywhere, sign-off included.

Why rule 3 uses a digest

Writing the address into a public workflow file in the clear would publish it far more prominently than the old commits this check exists to stop repeating. It is matched by SHA-256 digest instead, so the file never contains it.

Validated before pushing, not after

Against the last 60 commits of all four repositories: not one email false positive. An earlier revision of this branch had two, both found the same way and fixed —

  • dependabot signs off as support@github.com, and this repo's recent history includes such commits, so it would have failed every dependency PR;
  • claude_code@2.1.263.json and pkg@1.2.3.tar.gz are filenames, so the last label must look like a TLD and known file suffixes are excluded.

Every remaining failure across that window is a session identifier this check already caught.

The workflow's own run: block was then extracted and executed end to end against three throwaway commits: a contributor @gmail sign-off passes, the maintainer address fails, a pasted user=bob@example.org log line fails — and neither address is echoed into the log, because a log line is a publication too.

Scope unchanged

Still scans only BASE_SHA..HEAD — never full history. This repo has 83 pre-existing session-link violations on main, by far the most in the org; a full-history scan would fail every build from day one. This stops new leaks; it does not clean old ones, which is a settled decision.

🤖 Generated with Claude Code

The scan matched @gmail, @yahoo, @Hotmail, @outlook and @ProtonMail. A
contributor at a corporate or self-hosted domain passed straight through, and
so did an address pasted into a commit body from a log or a quote -- which is
the way an address actually reaches a commit message by accident.

It now matches any address and allows only the ones that identify a service
rather than a person: a GitHub noreply address, noreply@anthropic.com,
support@github.com and noreply@github.com.

Two false positives were found by running the new rule over the last 60
commits of all four repositories before shipping it, and both are handled:
dependabot signs off as support@github.com, and matches like
claude_code@2.1.263.json or pkg@1.2.3.tar.gz are filenames rather than
addresses, so the last label must look like a TLD and known file suffixes are
excluded. After those fixes, no commit fails for an email reason -- every
remaining failure over that window is a session identifier this check already
caught.

The consequence worth stating: signing off with a personal address now fails
CI, for maintainers and outside contributors alike. GitHub issues every
account a noreply address for exactly this, and it satisfies DCO.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review September 9, 2026 12:42
@jothimani-rajendran
jothimani-rajendran merged commit 923bcae into main Sep 9, 2026
15 checks passed
@jothimani-rajendran jothimani-rajendran changed the title ci: catch any leaked email address, not five consumer domains ci: block the maintainer's address, leave contributors' alone Sep 9, 2026
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.

2 participants