Skip to content

ci: add no-private-data check to scan PR commit messages - #127

Merged
jothimani-rajendran merged 2 commits into
mainfrom
ci/no-private-data
Sep 9, 2026
Merged

ci: add no-private-data check to scan PR commit messages#127
jothimani-rajendran merged 2 commits into
mainfrom
ci/no-private-data

Conversation

@jothimani-rajendran

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

Copy link
Copy Markdown
Collaborator

Adds the no-private-data job from open-coder-ai/agentseam's .github/workflows/ci.yml to this repo, as a new .github/workflows/commit-hygiene.yml.

What it does: on every pull request, it scans the commit messages of the commits the PR introduces for patterns that indicate local or personal data leaked into a message: absolute home-directory paths (/home/..., /Users/...), session identifiers, claude.ai/code/session links, /tmp/claude-* paths, and personal email domains (gmail/yahoo/hotmail/outlook/protonmail). If a match is found it fails the build and names the offending commit SHA — it never echoes the matched text itself, since a log line is a publication too. The scan pattern is byte-identical to agentseam's, verified by direct comparison.

Scope: it only scans BASE_SHA..HEAD (excluding merge commits) — the commits a specific pull request adds — never the repository's full history. This repository has 10 pre-existing violations already on main; a full-history scan would fail every build starting today. This job stops new leaks from landing; it does not attempt to clean up history that has already leaked.

Why a separate workflow rather than a job in ci.yml: the first revision of this PR appended the job to ci.yml, which took that file to 316 lines and failed tests/test_repo_standards.py::test_no_file_exceeds_line_budget on all three Python versions. That test's own failure message asks for a split by activity rather than a bigger file, and figures.yml is already the precedent, so the job lives in commit-hygiene.yml and ci.yml returns to 293 lines. The budget itself is untouched — raising it would have silenced the check that caught the mistake.

The actions/checkout step is pinned to 3d3c42e5aac5ba805825da76410c181273ba90b1 (tag v7), the pin this repo already uses everywhere else.

Verified locally: the job's run: block run against a throwaway commit carrying a synthetic match exits 1 and names the commit; run against the real commits it exits 0. Both workflows parse. tests/test_repo_standards.py passes. Full suite: 1138 passed, 2 skipped, with the two known test_compiled_freshness / test_runtime_goldens failures that reproduce on unmodified main in this environment and pass in CI.

🤖 Generated with Claude Code

Copies the no-private-data job from open-coder-ai/agentseam's ci.yml.
It scans only the commits a pull request introduces (BASE_SHA..HEAD),
never full history, so it does not fail on this repo's 10 pre-existing
violations already on main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Appending the job to ci.yml took that file to 316 lines, seven over the
repo's own 300-line review budget, and
tests/test_repo_standards.py::test_no_file_exceeds_line_budget failed on all
three Python versions. Its failure message asks for a split by activity
rather than a bigger file, and figures.yml is already the precedent for
exactly that, so the job moves to commit-hygiene.yml and ci.yml returns to
293 lines. The budget itself is untouched -- raising it would silence the
check that caught this.

The scan pattern is byte-identical to agentseam's, verified by comparison.
Both workflows parse. The moved job still catches a leak: a throwaway commit
carrying a synthetic match makes it exit 1 and name the commit without
echoing the match, while the real commits exit 0.

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 10:40
@jothimani-rajendran
jothimani-rajendran merged commit df1bb79 into main Sep 9, 2026
19 checks passed
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