PII Detection
The contains_pii rule looks for personal data in prompts, responses
and tool calls. Every identifier it detects is listed here, with the name to use in a rule and how a
match is confirmed. The dashboard offers the same list.
Choosing what to detect
- In the dashboard, open Rules → PII detection and choose identifiers one by one, or a whole region.
- A rule's
patternslist takes identifier names, region names (global,eu,nordics,gb,us), the country codes listed under a region, andphonefor both phone patterns. An unknown name is refused when the rule is saved. - A region includes identifiers added later. Each addition is listed in the changelog. Name identifiers one by one if a rule must not change on its own.
- A rule that names nothing detects
email,phone,ssn.
How a match is confirmed
Where an identifier has a check digit or ranges that are never issued, a value of the right shape
counts only if it passes that check, so an order number or a timestamp of the same length is not
flagged. Where it has none, the format alone decides. An identifier whose format is shared with
ordinary numbers, and that has no check or one too weak to tell them apart, counts only after a word
that names it, on the same line, such as CPR before a Danish number or
BSN before a Dutch one; only the number is matched. Under
redact a
match is replaced with [REDACTED:pii]; under
block the request is refused.
Global
In a rule: global.
E.164: + and 7 to 15 digits, without spaces.
Visa, Mastercard, American Express and Discover numbers, with or without spaces or dashes, confirmed by the Luhn check digit.
Account numbers from the SEPA countries, written in capitals, as one run or in groups of four.
Four numbers from 0 to 255.
A date written after "DOB", "date of birth", "born on" or "birthday".
European Union
In a rule: eu, or one country:
de Germany, es Spain, fr France, it Italy, nl Netherlands.
eu also detects IBAN (bank account number), Danish CPR number, Finnish personal identity code (henkilötunnus), and Swedish personal identity number (personnummer), listed under their own regions.
Eleven digits, optionally grouped 2-3-3-3. One digit appears two or three times in the first ten, and the last is a check digit.
Eight digits and a check letter, in capitals. Also the Spanish tax number (NIF) of a person.
X, Y or Z, seven digits and a check letter, in capitals.
Fifteen digits with the key, spaced or not; 2A and 2B for Corsica. Provisional numbers (3, 4, 7, 8) included.
Sixteen characters in capitals. Codes where letters stand in for digits (omocodia) included.
Nine digits after BSN, BSN-nummer or burgerservicenummer on the same line, passing the 11-proef.
Nordics
In a rule: nordics, or one country:
dk Denmark, fi Finland, is Iceland, no Norway, se Sweden.
DDMMYY-NNNN after CPR, CPR-nr. or CPR-nummer on the same line. Danish numbers have had no check digit since 2007, so a number on its own is not matched.
DDMMYY, a century sign, three digits and a check character, in capitals. Includes the century signs added in 2023.
DDMMYY-NNNN or ten digits. A person's number only: company numbers are not matched.
Eleven digits, optionally with a space after the date. D-nummer and H-nummer included.
YYMMDD-NNNN (+ from age 100) or with the century, YYYYMMDD-NNNN or twelve digits. Samordningsnummer included. Ten digits are matched only with the - or +.
United Kingdom
In a rule: gb.
Two letters, six digits and A to D after National Insurance, NI number, NI no. or NINO on the same line. Prefixes that are never issued are ignored.
United States
In a rule: us.
Ten digits, optionally separated by -, . or a space. The area code and exchange cannot start with 0 or 1.
Written with dashes. Numbers that are never issued (area 000 or 666, group 00, serial 0000) are ignored; ITINs are included.
Missing an identifier?
Tell us which one and where it is used at
support@signalvault.io.
Each identifier ships with tests of valid values, values that fail its check and look-alikes, and is
named in the changelog. Until then, a regex_match rule can match your
own format.