Skip to content

Resolves LAT-IPGG: redact PII from flagger instruction extraction - #4250

Draft
geclos wants to merge 1 commit into
developmentfrom
cursor/assistant-pii-exposure-93d4
Draft

Resolves LAT-IPGG: redact PII from flagger instruction extraction#4250
geclos wants to merge 1 commit into
developmentfrom
cursor/assistant-pii-exposure-93d4

Conversation

@geclos

@geclos geclos commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Resolves LAT-IPGG

Problem

Signal LAT-IPGG flagged flagger:extract-instructions for leaking real contact details into assistant output.

Sample trace 7a94f471d3dffe1bea15fc866995faa0: the inspected Hermes system prompt contained memory with vlad-ai@agentmail.to and +17322174739, and the extractor copied them into agentContext.

Fix

In instruction extraction:

  1. Redact emails / E.164 / NANP phones from the inspected prompt before sending it to the extractor LLM.
  2. Tell the extractor not to copy personal identifiers or private contact details.
  3. Sanitize agentContext (and fallback excerpts) before cache/classifier use, so a model that still echoes PII cannot pass it downstream.

Branch: fix/lat-ipgg-extractor-pii-redaction (same commit as this PR head).

Test plan

  • Unit tests for redactPersonalDataFromText
  • Integration test that mirrors the LAT-IPGG prompt/output shape and asserts extractor input + downstream classifier context have no raw email/phone
  • pnpm --filter @domain/flaggers test src/use-cases/run-flagger.test.ts
Open in Web Open in Cursor 

Prevent extract-instructions from echoing emails and phone numbers from
inspected system prompts into agentContext (LAT-IPGG).

Co-authored-by: Gerard <gerard@latitude.so>
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
design-system Skipped Skipped Jul 27, 2026 5:49pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d58104a-a587-4e66-8abe-eb305ae49319

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/assistant-pii-exposure-93d4

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants