PII Discovery Scanner
Operator: Abdulla Al Fahad. How tools are built and checked
Personal data collects in places nobody planned for: an export left in a shared drive, a spreadsheet with a card column, an e-mail with a passport number in the body. Before any of it can be protected, minimised or deleted, someone has to find it. This scanner reads a folder of files in your browser, looks for the kinds of values that identify a person, and tells you where they are, how sure it is, and what each file's exposure adds up to.
The input is by definition sensitive, so the page keeps everything in the tab and shows values masked: a card as **** **** **** 1111, an e-mail as j******@example.com. Exports contain the masked value, the type, the confidence and the reasons, and no text from around the match, and there is no switch that turns that off. The on-screen snippet also masks every digit run and e-mail-like token near a finding, and the unmask toggle affects the screen only.
Finding is the first half of the job. The report links each file to a redaction tool on this site for its type, and the folder-level data map groups what was found by category so it can seed a record of processing activities.
Key features
- Payment cards by Luhn checksum and issuer ranges (Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay), with published test numbers marked as such
- IBANs from 77 countries by length and mod-97, US SSNs by the issuing rules, UK National Insurance numbers, and national ID numbers for 24 countries by their own check digits
- E-mail addresses, phone numbers through libphonenumber, IPv4 and IPv6 addresses, GPS coordinates, dates of birth, passport numbers, passport machine-readable zones and driving licence numbers
- A confidence level for every finding, with the reasons listed, and a file risk score whose formula is shown on the page
- Readers for text, CSV, JSON, XLSX, DOCX (body, headers, footers, footnotes, comments), PPTX slides and notes, PDF text layers, EML, MSG and ZIP files one level deep
- A folder-level data map by category for a record of processing, a per-file inventory CSV, and links to a redaction tool for each file type
What is detected, how it is validated and how the score is built
A detector does two things: find a candidate, then try to disprove it. A 16-digit number is reported as a card only if it passes the Luhn check and its first digits and length fit an issuer. A string that starts with two letters and two digits is an IBAN only if its length matches the country and its mod-97 remainder is 1. National IDs use the check rule of their own country, for example the 23-letter table of the Spanish DNI, the mod-11 weights of the Dutch BSN, the date and Luhn check of the Swedish personnummer, and Verhoeff for the Indian Aadhaar.
Structure decides how much a valid check digit is worth. Numbers that contain letters or a date and a checksum (an IBAN, an Italian codice fiscale, a Singapore NRIC) start high. A bare nine-digit number that passes a checksum starts low, because roughly one in ten random nine-digit numbers passes, so it is reported only when a keyword such as BSN, TFN or SIN appears within about 50 characters.
Limits: files up to 50 MB (PDF and Word included), 5,000 files per run, 500 ZIP members and 200 MB of unpacked data per ZIP, 20 million characters per file and 2,000 findings listed per file. PDF pages without a text layer, images inside documents and password-protected files are not read. MSG and EML attachments are not opened.
How it works
The confidence thresholds are 0.8 for high, 0.5 for medium and anything below 0.3 is dropped. A related keyword adds 0.25 to 0.4 depending on the type; a published test card, a documentation SSN or an example.com address lowers the score to 0.2 or 0.3. When two detectors claim the same text, the one with the stronger structure (card before IBAN before SSN, and so on) wins.
The file risk score is round(100 x (1 - e^(-S/25))) where S adds up weight x confidence factor over the findings. Weights run from 10 for a card or SSN to 1 for an e-mail address or IP address, and the factors are 1 for high, 0.6 for medium and 0.25 for low. One card number at high confidence gives 33; ten card numbers give 98.
When to run it
- A data protection officer scans a departmental share. Summary shows which categories of data occur and in how many files, and the data map CSV goes into the record of processing as a first draft.
- An engineer checks a log export before sending it to a vendor. The scan finds public IP addresses and one e-mail per request, so the logs are not shared as they are.
- A finance team scans last year's reconciliation spreadsheets and finds a column of card numbers that Luhn accepts, in a workbook that was meant to hold only invoice totals.
- A legal team scans a ZIP from a data-room before upload and finds a passport machine-readable zone inside a scanned-then-OCRed PDF's text layer.
- An HR team scans a ZIP of onboarding scans exported to text and finds passport numbers in files named after projects, not people. The folder name had hidden what was in it.
Running a check
- Set the default country for phone numbers, then choose files or a whole folder, or scan the built-in sample files.
- Wait for the scan, then read Summary for counts by type and category.
- Open a file in Files to see each finding with a masked snippet and the reasons; the exports leave the snippet out so no neighbouring text can leak.
- Export the inventory, the masked findings or the data map.
- Open the redaction link next to a file to remove the data from a copy, then rescan.
Example
Five small text files with 54 seeded values and look-alikes written to trip the validators (the built-in example)
customers.csv, hr-notes.txt, support-emails.txt, server.log and lookalikes.txt, with default country GBFindings at medium or high confidence
54 of 54 seeded values found, 0 other values reported: 3 cards, 4 IBANs, 2 SSNs, 2 NINOs, 14 national IDs from 14 formats, 6 e-mails, 5 phones, 6 dates of birth, 3 passport items, 2 driving licences, 4 IP addresses, 3 coordinate pairs
Low confidence only: the test card 4111 1111 1111 1111, sam@example.com and info@brightpath.io
lookalikes.txt (invalid Luhn numbers, random 9-digit numbers, ISBN, EAN, timestamps, bad IBAN checks) produces no findingLimits
A clean scan is not clearance. Scanned images, text inside pictures, handwriting, encrypted files and values split across spreadsheet cells are not detected.
Numbers with no checksum are the weak spot. A random nine-digit number beside the word SSN is reported as medium by design, because the keyword is the only evidence.
Dates of birth, passports and driving licences are reported only after a keyword, so a bare date or an unlabelled passport column is not found.
The unmasked toggle shows real values on screen. Turn it on only where nobody else can see the display.
- Choose the default country before choosing files: a national-format number such as 020 7946 0958 is only recognised as a phone number when a country is set.
- Use Show findings at: medium and high for a first pass, then switch to any confidence for the files you will review by hand.
Common errors and how to fix them
- binary or unsupported content
- The file has no readable text: an image, a database or an executable. Convert or export it to a supported format if it might hold personal data.
Best practices
- Scan a copy of the folder, not the live share, and delete the exports once the data map has been moved into your record of processing; even masked, a list of which files hold card numbers is sensitive.
- After redacting a file with the linked tool, rescan the redacted copy: a value that the redactor missed shows up again as a finding.
What a finding does and does not mean
A high-confidence card number is a number that passes the Luhn check, fits an issuer range and appears next to a related word or in the usual grouping. It is very likely a card number; it is not proof the card is live or belongs to a person.
A low-confidence e-mail or IP address may be a system or documentation value. Review the reasons column before deciding, and use the Show findings at filter to keep the first pass short.
Frequently asked questions
Will random numbers be reported as cards or IDs?
Some will. A random 16-digit number passes the Luhn check about one time in ten, and the issuer prefix and length rules remove most of those, but a few survive; next to a word such as card, SSN or BSN the keyword adds confidence and more random numbers reach medium. That is why every finding carries a confidence level and its reasons. The built-in example corpus finds all 54 seeded values with no false positives at medium or high confidence, but it was written next to the detectors, so treat it as a regression check and not as an accuracy figure.
Why do documentation test card numbers still appear?
4111 1111 1111 1111 and the other numbers in payment providers' documentation are valid by Luhn, so they are found, but they are scored 0.3 (low) and labelled as published test numbers because they are not real accounts.
Which countries have national ID detection?
Spain, Italy, the Netherlands, Sweden, Poland, Canada, Brazil, France, Belgium, India, Australia, South Africa, Singapore, Ireland, Finland, China, South Korea, Norway, Turkey, Chile, Switzerland, Japan, Romania and Israel. Each uses its own check rule. Many other countries issue IDs with no public checksum, and those cannot be validated by a scanner like this.