Verify Your Mask: The Loop That Catches the Mask It Gets Wrong
A mask that "worked" is not evidence. The failure mode is quiet: a span off by one leaves a trailing digit; a group you unticked still holds a value; an alias used twice got only one of its two occurrences replaced. The verdict you need is about the output text, not about intent.
The loop
- Scan the input. Findings group by type (email, phone, ID, secret, name) so you can untick a group when a value should survive.
- Mask. Replacements are stable tokens — the same email maps
to
<EMAIL_1>at every occurrence — and alias grouping collapses two mentions of one person to one token. - Verify. The output is fed back through detection. If nothing critical remains, the summary reads verified. If something is left, it is named.
What "it reported a survivor" means
Usually a span bug in the mask, a duplicate in a group, or a format the detector only partially knows (e.g. a phone number in a country with no shipped shape). Masking is deterministic — the survivor will be found again on the next run, which is why the loop stops when it is clean rather than after one unverified pass.
When a survivor is intentional
Unticking a group is a user decision and must look like one in the output. PII Shield distinguishes these two cases: values that survive because you kept them are reported, but not as an error. That matters — a tool that yells at every deliberate choice gets its warnings muted.
A worked verify run
Mask a ticket, then untick the IDs group because the reader needs the case reference. The verify summary now reports the ID token as retained by choice — not as a failure, and not silently either. That distinction is the whole design: a tool that cannot tell a deliberate keep from a leak trains you to dismiss its warnings, and a tool that hides deliberate keeps hides real leaks with them. Everything the verify step says should be either an error or a confirmation — never noise.
Why a mask can miss — the four failure classes
A survivor in the verify report is one of four things: (1) a span error — the detector found the value but the mask cut one character short; (2) a group skip — the group was unticked and the value was kept deliberately; (3) an unknown format — a country or key type with no shipped rule; (4) overlapping detections that merged into a span wider than the value. Each class has a different remedy: report spans to improve the detector, keep intentional skips (they are reported, not flagged), add the missing format, or check the merge logic. The verify report is what makes these diagnosable instead of mysterious.
Self-check is part of the product
The detector suite has a half that asserts false positives stay quiet: documentation credentials, order numbers, valid non-card digits. A detector that fires too often is worse than one that stays quiet — the first makes you shrug, the second makes you check.
Everything on this page runs in your browser — open PII Shield and paste the document you are about to send.