Build-an-X workflow that owns the full detect → mask → verify pipeline for PII in test data. Walks the author through (1) classifying each field against the cross-regime PII catalog (GDPR / CCPA-CPRA / NIST SP 800-122 / HIPAA, in references/pii-categories.md), (2) picking a masking operator from the techniques catalog (seven canonical operators + Presidio operators + privacy models, in references/masking-techniques.md), (3) deciding pseudonymisation (reversible, in GDPR scope) vs anonymisation (irreversible, out of scope), (4) ordering the pipeline (detect → operator → audit) and emitting a deployable YAML config for Presidio + Faker + Synthea wrappers (Faker-as-masking-operator detail in references/faker-masking-operators.md), and (5) running the adversarial verification pass that re-detects PII in the masked output and blocks promotion on a leak. Use when non-production environments need masked production data - from field classification through runnable masking config to the leak audit.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Full per-regime enumerations behind pii-categories.md. The cross-jurisdiction map there is the fast scoping tool; this file holds the detail behind each column.
Definition (Article 4(1)): "any information relating to an identified or identifiable natural person ('data subject')" (gdpr-info.eu/art-4-gdpr/).
The article enumerates identifiers that make a person identifiable:
| Identifier class | Examples |
|---|---|
| Name | Given name, surname, full name, online aliases linked to the person |
| Identification number | National ID, passport, driver's licence, tax ID, employee ID |
| Location data | GPS coordinates, IP-derived city/region, cell-tower triangulation |
| Online identifier | IP address, cookie ID, device fingerprint, advertising ID (per Recital 30) |
| Physical/physiological factor | Height, weight, eye colour, fingerprint, gait |
| Genetic factor | DNA-derived information (further defined in Art. 4(13)) |
| Mental factor | Diagnosed mental-health conditions, IQ test results |
| Economic factor | Salary, credit score, transaction history, account balances |
| Cultural factor | Language, religion, ethnic background |
| Social factor | Marital status, family relationships, social-network connections |
Source: Article 4(1) GDPR (gdpr-info.eu/art-4-gdpr/).
Article 9(1) lists categories whose processing is prohibited by default unless one of the Article 9(2) exceptions applies:
A masking pipeline for an EU dataset must apply at least the broader Art. 4(1) rules and stricter rules to any field falling under Art. 9 (special categories carry higher fines and must be either redacted or fully anonymised, not merely pseudonymised).
"Pseudonymisation" (Art. 4(5)) keeps data attributable to a subject with additional information, kept separately. Pseudonymised data is still personal data under GDPR - it remains in scope.
Anonymised data (no longer linkable to a subject under any reasonably likely method, per Recital 26) falls out of GDPR scope. The masking pipeline must mark which output is which (masking-techniques.md explains the techniques).
Definition (Cal. Civ. Code § 1798.140(v)(1), as amended by CPRA): "information that identifies, relates to, describes, is reasonably capable of being associated with, or could reasonably be linked, directly or indirectly, with a particular consumer or household" (oag.ca.gov/privacy/ccpa).
Statutory categories enumerated in § 1798.140(v)(1)(A) - (K):
| # | Category | Examples |
|---|---|---|
| A | Identifiers | Name, postal address, email, IP address, account name, SSN, driver's licence, passport |
| B | Customer records | Records covered by Cal. Civ. Code § 1798.80(e) - name, signature, education, employment, financial info, medical, health-insurance, with paper/electronic regardless of storage medium |
| C | Protected classifications | Race, religion, gender, sexual orientation, age, national origin, disability, marital status (under California or federal law) |
| D | Commercial information | Purchases, products considered, consuming history |
| E | Biometric information | Fingerprints, retina, hand prints, voice recordings, keystroke patterns |
| F | Internet/network activity | Browsing history, search history, interaction with a website or app |
| G | Geolocation data | Physical location, movements, especially "precise geolocation" (CPRA refinement) |
| H | Sensory data | Audio, electronic, visual, thermal, olfactory recordings |
| I | Professional/employment | Job titles, salaries, employment records |
| J | Education | Education records as defined in 20 USC § 1232g (FERPA) |
| K | Inferences | Profile drawn from any of A - J to predict preferences, characteristics, predispositions, behaviour |
CPRA added a subcategory of personal information requiring extra protection (Cal. Civ. Code § 1798.140(ae)):
Citation: oag.ca.gov/privacy/ccpa "Sensitive Personal Information" (oag.ca.gov/privacy/ccpa).
Definition (citing OMB Memorandum 07-16, reproduced in NIST SP 800-122 Section 2.1): "information which can be used to distinguish or trace an individual's identity, such as their name, social security number, biometric records, etc., alone, or when combined with other personal or identifying information which is linked or linkable to a specific individual, such as date and place of birth, mother's maiden name, etc."
Citation: NIST SP 800-122:2010 §2.1, fetched from csrc.nist.gov/pubs/sp/800/122/final.
NIST 800-122 §2.2 introduces a crucial distinction:
A masking pipeline must consider linkable fields (e.g., birth date alone isn't identifying, but date + zip + sex is - the Sweeney 87 % rule). The pipeline shouldn't only protect direct identifiers.
NIST 800-122 §3 names six factors that drive the PII confidentiality impact level (low / moderate / high):
Masking aggressiveness scales with impact level.
For health data (PHI), the HIPAA Privacy Rule defines two de-identification methods (Expert Determination, 45 CFR § 164.514(b)(1), and Safe Harbor, 45 CFR § 164.514(b)(2)). Safe Harbor requires removing all of these 18 identifiers (per HHS guidance, hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification):
A masking pipeline operating on health data must catch all 18; a detector configured only for GDPR's broader categories will miss HIPAA-required identifiers (e.g., medical record number is not explicit in GDPR Art. 4(1) - covered by "identification number" but a detector may not flag it without a HIPAA-specific recogniser).