fix(test): scrub personal PII from provider fixtures + add recurrence guard#456
Merged
Merged
Conversation
… guard Provider status-detection fixtures are captured from live CLI TUIs whose login banners print the authenticated account email. Two such addresses were committed: - Delete 9 orphaned `test/providers/fixtures/antigravity_cli_*.txt` fixtures (shipped via awslabs#436) that captured a maintainer's Google login banner. They are referenced by NO test — the antigravity suite uses the separate `agy_*.txt` fixtures — so deleting them removes the PII with zero test impact. - Redact a contributor's account email in `test/providers/fixtures/claude_code_new_tui_completed_raw.txt` (used by `test_claude_code_unit.py`) to `user@example.com`. The email sits in the header banner; the test asserts only COMPLETED status and the bottom-box pattern, so detection is unaffected. - Add `test/test_fixtures_no_personal_pii.py`: a fail-closed guard that scans every `test/**/fixtures/**` file for personal-provider email addresses (gmail, icloud, …) and fails CI, so a live-capture PII leak cannot recur. Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
=======================================
Coverage ? 89.35%
=======================================
Files ? 156
Lines ? 18510
Branches ? 0
=======================================
Hits ? 16539
Misses ? 1971
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 tasks
Collaborator
Author
|
@fanhongy TY for fast approval - i created #457 in light of the issue which we can all discuss at a later point. This issue was low-severity but probably a good reason to think about how we would deal with a more severe issue if/when that happens. cc @haofeif @call-me-ram |
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
Removes personal email addresses (PII) that were committed into provider test
fixtures, and adds a guard so it cannot happen again.
test/providers/fixtures/antigravity_cli_*.txtfixturesthat captured a maintainer's Antigravity/Google login banner
(
…@gmail.com (Google AI Ultra)). These files are referenced by no test —the antigravity suite loads the separate
agy_*.txtfixtures — so removingthem has zero test impact.
test/providers/fixtures/claude_code_new_tui_completed_raw.txt(which isused by
test_claude_code_unit.py) touser@example.com. The address sat inthe header banner; the test only asserts
COMPLETEDstatus and the bottom-boxpattern, so status detection is unaffected.
test/test_fixtures_no_personal_pii.py— a fail-closed guard thatscans every
test/**/fixtures/**file for personal-provider email addressesand fails CI if any are found.
No personal email remains in any tracked file after this change.
How this happened
Provider status-detection fixtures are recorded from live CLI TUIs. Several
CLIs (Antigravity, Claude Code) print the authenticated account's email in
their startup/login banner. When those raw terminal captures were saved verbatim
as fixtures and committed, the account emails rode along inside the ANSI escape
stream — not obvious in a rendered terminal, but plainly visible in the file and
in the PR diff. One set shipped in #436 (which merged before the removal landed);
another had been present in an older claude_code capture.
Because the addresses are embedded among ANSI escape codes, they slipped past
manual diff review.
Prevention
test/test_fixtures_no_personal_pii.pyfails CIthe moment a fixture contains an address at a personal mail provider (gmail,
icloud, outlook, proton, …). Synthetic/tooling addresses (
@example.com,git@github.com) are intentionally allowed so legitimate fixtures still pass.login/banner line before committing — replace the account email with
user@example.com. Prefer capturing on a throwaway/synthetic account wherepossible.
git history at the merge commit. If full history scrubbing is desired, that
requires a maintainer-run
git filter-repo/BFG pass on the default branch(out of scope for a normal PR); the affected account owners may also wish to
treat the addresses as publicly exposed.
Testing
test/test_fixtures_no_personal_pii.py— passes (no PII remains).test_claude_code_unit.py,test_antigravity_cli_unit.py,test_tool_mapping.py— pass (redaction/deletion broke nothing).black/isortclean.