TrapDefense Docs
PII Catalog

PII Profile Catalog

Detailed reference for the 17 PII profiles. Select them with the pii_profiles parameter.

See what each PII profile detects and how it redacts output.

If pii_profiles is omitted (null), all available profiles run.


SDK Default Profiles (4)

global-core

PII typeRedaction labelPatternNotes
Email[EMAIL]user@domain.com
Phone[PHONE]International or domestic formats, 10+ digits
API key[API_KEY]sk_, pk_, api_key= and similar prefixes with 20+ character values
Bearer token[BEARER_TOKEN]Bearer followed by a 20+ character token
Secret[SECRET]password=, secret=, token= and similar labels with 6+ character values

False-positive notes

  • phone: any 10+ digit pattern can match, so order numbers or reference codes may need a narrower profile selection
  • secret: values like password=test123 are intentionally detected even in development-style text

Recommended baseline: include this in almost every deployment.


kr

PII typeRedaction labelPatternNotes
Korean resident number[KRN]YYMMDD-NNNNNNNMonth and day validity checks included
Business registration number[BRN]NNN-NN-NNNNN
Bank account number[ACCOUNT]10 to 16 digits, optional hyphensTotal-length validation

False-positive notes

  • account: 10 to 16 digit sequences are broad enough that generic references can match

Recommended combination: ["global-core", "kr"]


us

PII typeRedaction labelPatternNotes
SSN[SSN]XXX-XX-XXXXInvalid 000, 666, 9xx, 00, and 0000 ranges are excluded

False-positive notes

  • SSN matching is relatively strict, so false positives are lower than many number-only patterns

Recommended combination: ["global-core", "us"]


eu-iban

PII typeRedaction labelPatternNotes
IBAN[IBAN]2-letter country code + 2 check digits + up to 30 characters

Recommended combination: ["global-core", "eu-iban"]


API-Extended Profiles (13)

jp

PII typeRedaction labelPatternValidation
My Number[MY_NUMBER]12 digitsNearby context keyword required within 60 characters (マイナンバー, 個人番号, my number)
Japanese phone[JP_PHONE]0X0-XXXX-XXXX or +81-X0-XXXX-XXXX

False-positive control

  • My Number is only detected when the keyword context is near the number, which reduces collisions with order IDs and generic references

Recommended combination: ["global-core", "jp"]


cn

PII typeRedaction labelPatternValidation
Chinese national ID[CN_ID]18 digitsRegion prefix, birth year, month, and day validation
Chinese mobile phone[CN_PHONE]1[3-9] plus 9 digits

Recommended combination: ["global-core", "cn"]


in

PII typeRedaction labelPatternValidation
Aadhaar[AADHAAR]12 digits starting with 2-9Total length validation
PAN[PAN]AAAAA9999AFourth letter must be one of the supported codes

False-positive notes

  • PAN is highly structured and tends to be precise
  • Aadhaar is broader, but the start digit and grouping rules reduce noise

Recommended combination: ["global-core", "in"] or ["global-core", "in", "payment"] for payment-heavy flows


br

PII typeRedaction labelPatternValidation
CPF[CPF]XXX.XXX.XXX-XXPunctuation required
CNPJ[CNPJ]XX.XXX.XXX/XXXX-XXPunctuation required

False-positive notes

  • Required punctuation keeps false positives low

Recommended combination: ["global-core", "br"]


ca

PII typeRedaction labelPatternValidation
SIN[SIN]XXX-XXX-XXX or spaced 9-digit formatLuhn checksum required

False-positive control

  • Generic values such as 123-456-789 do not match because they fail checksum validation

Recommended combination: ["global-core", "ca"]


au

PII typeRedaction labelPatternValidation
TFN[TFN]XXX XXX XXXWeighted checksum required

False-positive control

  • Generic references are filtered out unless they pass the TFN checksum

Recommended combination: ["global-core", "au"]


uk

PII typeRedaction labelPatternValidation
NINO[NINO]AB 12 34 56 CRestricted prefix list

False-positive notes

  • The mixed letter-number format makes false positives relatively low

Recommended combination: ["global-core", "uk"]


payment

PII typeRedaction labelPatternValidation
Credit card[CREDIT_CARD]Visa, Mastercard, Amex, Discover, JCB, UnionPayLuhn checksum required

Supported brands

BrandPrefixLength
Visa4xxx16
Mastercard51xx-55xx16
Amex34xx, 37xx15
Discover6011, 65xx16
JCB352x-358x16
UnionPay62xx, 81xx16

False-positive control

  • Only numbers that pass Luhn are detected

Recommended combination: ["global-core", "payment"], or add a regional profile such as ["global-core", "kr", "payment"]


sg

PII typeRedaction labelPatternValidation
Singapore NRIC / FIN[SG_NRIC]S1234567A-style identifiersStructural format check
Singapore phone[SG_PHONE]+65 8123 4567 or local 8-digit mobile/landline formatCountry code or nearby phone/contact context required

False-positive control

  • Local 8-digit phone matches require nearby context such as phone, mobile, contact, or +65

Recommended combination: ["global-core", "sg"]


eu-vat

PII typeRedaction labelPatternValidation
EU VAT ID[VAT_ID]Country prefix plus 8-12 alphanumeric charactersNearby VAT / tax-ID context required

False-positive control

  • Values such as order references with country prefixes are ignored unless VAT or tax-ID context is nearby

Recommended combination: ["global-core", "eu-vat"]


mx

PII typeRedaction labelPatternValidation
CURP[CURP]18-character personal identifierStructural format check
RFC[RFC]12-13 character tax identifierStructural format check

Recommended combination: ["global-core", "mx"]


ph

PII typeRedaction labelPatternValidation
Philippine TIN[PH_TIN]123-456-789-012Nearby TIN or tax-ID context required
Philippine SSS[PH_SSS]12-3456789-0Nearby SSS or social-security context required

False-positive control

  • Hyphenated numeric strings are not matched unless TIN or SSS context is nearby

Recommended combination: ["global-core", "ph"]


my

PII typeRedaction labelPatternValidation
MyKad / Malaysian NRIC[MY_NRIC]900101-12-1234Nearby MyKad, NRIC, or Malaysian identity-card context required

False-positive control

  • Date-like numeric strings are ignored unless MyKad / NRIC context is nearby

Recommended combination: ["global-core", "my"]


Profile Combination Guide

ScenarioRecommended profiles
Korean finance["global-core", "kr", "payment"]
US healthcare["global-core", "us"]
Japanese enterprise["global-core", "jp", "payment"]
Global ecommerce["global-core", "payment"]
European compliance["global-core", "eu-iban", "uk"]
China service workflow["global-core", "cn"]
Brazil fintech["global-core", "br", "payment"]
Singapore B2B workflow["global-core", "sg"]
EU tax operations["global-core", "eu-vat"]
Mexico back office["global-core", "mx"]
Minimal baseline["global-core"]
All profilesnull (omit pii_profiles)