PII Detection
The sensitive data scan finds the columns of a workflow’s input that hold personally identifiable information (PII) and other sensitive data, and suggests a masking transformer for each. You review the result, and the suggestions are written into the workflow’s configuration.
How the scan works
The scan checks the values in each column against rules for each type of sensitive data. A rule is a set of regular expressions; some types add a validation check, such as the Luhn check that real card numbers pass. A column whose values match a type’s rule is marked sensitive, with that type.
Because it matches patterns, the scan finds values with a recognisable shape, such as emails, card numbers or national identifiers, more reliably than free text. Treat its result as a starting point: review the columns it marks, and look for sensitive columns it can’t recognise, such as notes or comments.
From scan to masking
-
Run the scan on a workflow. It lists the columns it considers sensitive.
-
Review the list. Mark columns as sensitive or not sensitive where you disagree.
-
Apply the suggested transformers. They’re added to the workflow’s YAML configuration, under
transformations, where you can change them.
The scan only suggests; masking happens when the workflow runs. What happens to the columns the scan doesn’t mark depends on the table’s mode: in MASKING mode they still get a default masking transformer, and in KEEP mode they’re copied unchanged. See How Masking Works.
Run a scan
-
Open the workflow you want to scan.
-
Open Sensitive data scan from the left menu.
-
Click Run scanning.
-
Check the columns marked as sensitive. To change one, select it and click Update sensitivity.
-
Select the columns and click Apply suggested transformers. The workflow’s configuration is updated.
-
Open the Configuration tab to see the transformers that were added.
Types it recognises
You can set rules for 28 types of sensitive data:
| Group | Types |
|---|---|
Identity |
Email, Phone Number, SSN or National Insurance Number, Passport Number, Date of Birth, Person Name, Gender, Nationality |
Financial |
Credit Card, IBAN, BIC, Salary, Tax Identification Number (TIN), Legal Entity Identifier (LEI) |
Location |
Address, Postcode, Geolocation, IP Address (IPv4 and IPv6), MAC Address, License Plate |
Organization |
Company Name, Domain Name, Fax Number |
Special categories |
Race, Religion, Sexual Orientation |
Security |
Password, GitHub Token |
Rules at three levels
The scan starts from global, built-in patterns. You can replace the rule for a type for your organization, and replace that again for a project:
| Level | Where to set it | Applies to |
|---|---|---|
Global |
Built-in patterns that come with the platform |
Every workflow, unless replaced |
Organization |
Administration > Settings > PII Rules |
Every project, unless replaced |
Project |
The project’s settings, under PII Rules, then Override for this project |
That project’s workflows |
A rule at a narrower level replaces the broader rule for that type; it doesn’t add to it. For example:
Global EMAIL rule: .*@.* matches every email
Organization EMAIL rule: .*@company\.com replaces the global rule
Project EMAIL rule: .*@project\.company\.com replaces the organization rule
In that project, the scan only marks emails at project.company.com. To extend a rule rather than narrow it, include the broader patterns in your rule too.
Create a rule
-
Open the rules: Administration > Settings > PII Rules for the organization, or the project’s settings for a project.
-
Click Create rule.
-
Select the type of sensitive data, such as Email or Credit Card.
-
Enter a description, and the regular expressions, one per line.
-
Save the rule. For a project, click Override for this project.
Examples of patterns:
.*@internal\.company\.com internal email addresses
EMP-\d{6} employee numbers
CUST-[A-Z]{3}-\d{5} customer references
\+44 \d{4} \d{6} UK phone numbers in one format
Documents and other files
The scan covers database columns. Documents and other files are handled by docanon, which has its own detection and its own policy file; the rules on this page don’t apply to it. See Unstructured Data.