Skip to content

Commit d0671fb

Browse files
humanagentclaude
andcommitted
test(pii): add query-param embedded identifier stress case
CodeRabbit nitpick: the prompt rule explicitly calls out query-param embedded identifiers, but only mailto: was covered. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 92ebc87 commit d0671fb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/pii-stress.manual.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ const CASES: { name: string; fields: RedactableFields }[] = [
142142
"For escalations, use this mailto link: mailto:support-lead@example.com or the contact form at https://example.com/contact?ref=agent.",
143143
},
144144
},
145+
{
146+
name: "URL with email in query param — SHOULD redact only the embedded identifier",
147+
fields: {
148+
agentName: "Feedback Bot",
149+
description: "Collects product feedback",
150+
prompt:
151+
"Route bug reports to https://example.com/contact?email=foo@bar.com&subject=bug, leaving the rest of the link intact.",
152+
},
153+
},
145154
];
146155

147156
describe.runIf(KEY)("redactTemplatePii — live stress", () => {

0 commit comments

Comments
 (0)