Conversation
PR SummaryMedium Risk Overview Introduces Written by Cursor Bugbot for commit 7c485e8. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR adds opt-in PII (Personally Identifiable Information) redaction to the Entire CLI, extending the existing secret redaction capability. When enabled via settings, emails, phone numbers, addresses, and custom patterns are replaced with typed tokens (e.g., [REDACTED_EMAIL], [REDACTED_PHONE]) in metadata files (transcripts, prompts, summaries) before they're stored in git. Secret redaction (API keys, tokens) remains always-on. The implementation adds a new redact/pii.go module with configurable PII detection, integrates it with the existing redaction flow, and adds comprehensive settings support with local override capability.
Changes:
- Added opt-in PII detection with regex patterns for email, phone, and US street addresses, plus support for custom patterns
- Extended redaction to use typed tokens (
[REDACTED_<TYPE>]) for PII while maintaining backward-compatibleREDACTEDtokens for secrets - Integrated PII configuration loading from
.entire/settings.jsonwith proper defaults (email/phone default to true, address defaults to false)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| redact/redact.go | Modified region merging to support labeled redaction tokens; added PII detection call |
| redact/pii.go | New file implementing PII detection with configurable categories and custom patterns |
| redact/pii_test.go | Comprehensive tests for PII detection, category toggles, and coexistence with secrets |
| cmd/entire/cli/settings/settings.go | Added RedactionSettings and PIISettings structs to support configuration |
| cmd/entire/cli/settings/settings_test.go | Added tests for redaction settings loading and local overrides |
| cmd/entire/cli/strategy/common.go | Added EnsureRedactionConfigured() to load PII settings before checkpoint writes |
| cmd/entire/cli/strategy/manual_commit_hooks.go | Added EnsureRedactionConfigured() call in PostCommit hook |
| cmd/entire/cli/strategy/manual_commit_git.go | Added EnsureRedactionConfigured() call in SaveChanges |
| cmd/entire/cli/strategy/auto_commit.go | Added EnsureRedactionConfigured() call in SaveChanges |
| cmd/entire/cli/checkpoint/temporary.go | Changed metadata file blob creation to use createRedactedBlobFromFile (code files unchanged) |
ac2552e to
7c485e8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
931a213 to
177fcb3
Compare
177fcb3 to
848f6cc
Compare
Closes #363
Adds opt-in PII redaction to the redact/ package. When enabled, emails, phone numbers, and custom patterns are replaced with typed tokens ([REDACTED_EMAIL], [REDACTED_PHONE], etc.) stored in metadata, transcripts, prompts, summaries, and context files on both shadow and metadata branches.
Secret redaction (API keys, tokens) remains always-on and unchanged.
Thanks to @ishaan812 for filing the issue and proposing the approach.
Add to .entire/settings.json: