Personal data (PII) scanning

PII scanning looks for personal data that may have been saved in code, test files or settings. PII means personally identifiable information.

Included in every plan, including Free.

In AquilaX

AquilaX PII finding for an email address, with the addresses partly masked
Email addresses are partly masked in the title and the code.

Screenshots that show scan results use our public test apps, which are vulnerable on purpose. Select an image to enlarge it.

What it looks for

Contact details

Information such as email addresses and phone numbers.

Identity data

Information such as Social Security numbers.

Payment cards

Card numbers must pass a checksum before they are reported.

Examples

These examples show common problems and safer ways to write the code. They are not AquilaX results, and scanner coverage can vary.

Card data written to the logs

PCI DSS 3.3PythonCritical
Vulnerable · payments/views.py
@app.post("/checkout")
def checkout():
    payload = request.get_json()
    log.info("checkout request: %s", payload)
    charge(payload["card_number"], payload["cvv"], payload["amount"])
Why it's exploitable

The whole body is logged, card number and CVV included. Logs get shipped to Datadog or ELK, kept for months, and read by far more people than the payments database.

PCI DSS forbids storing the CVV after authorisation at all, in any form.

The fix
log.info("checkout user=%s amount=%s", user.id, payload["amount"])
# better: tokenise cards in the browser (e.g. Stripe Elements)
# so raw card numbers never reach your server

Production rows copied into test fixtures

GDPR Art. 17FixturesHigh
Vulnerable · tests/fixtures/customers.json
{
  "name":  "Maria Kowalski",
  "email": "[email protected]",
  "iban":  "DE89 3704 0044 0532 0130 00",
  "dob":   "1984-03-12"
}
Why it's exploitable

Someone exported a few rows from production to reproduce a bug. Now real names and bank details sit in the repo, get copied into every fork and CI cache, and survive any erasure request.

The fix
from faker import Faker
fake = Faker("de_DE")
customer = {"name": fake.name(), "email": fake.email(),
            "iban": fake.iban()}

An SSN in a URL

CWE-598JavaScriptMedium
Vulnerable · web/lookup.js
fetch(`/api/lookup?ssn=${ssn}&dob=${dob}`)
Why it's exploitable

Query strings land in access logs, proxy logs, browser history and analytics tools, and sometimes in Referer headers sent to third parties. Put a social security number in the URL and it gets copied into all of them.

The fix
fetch("/api/lookup", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ ssn, dob }),
});

What to know

  • AquilaX masks personal data in the results.
  • It leaves out well-known public IP addresses and the contact details of authors in third-party code.
  • For very large data files, it limits how much it scans.
  • The scanner checks code and files. It does not check live databases, and it does not confirm that you comply with GDPR or another law.

See all scanners How to fix findings

Questions and answers

Can real personal data be used as test data?

It is safer to use made-up data. If real data has been added to a repository, ask your privacy team what to do.

Does PII scanning make us comply with GDPR?

No. It can help you find some personal data, but GDPR covers much more than code scanning.

What types of personal data does AquilaX look for?

Examples include email addresses, phone numbers, Social Security numbers and payment card numbers. The scanner may not find every type or format.

How are payment card numbers checked?

A number must pass a checksum before it is reported, which helps reduce false matches. A match does not prove that the card is real or active.

Does the PII scanner check databases?

No. It checks code and files, including data files in your repository. It does not connect to live databases.

Why are some email addresses not reported?

The scanner leaves out contact details for authors of third-party code. This avoids reporting library authors as personal data in your project.

Are very large data files scanned in full?

Not always. AquilaX limits how much of a very large data file it scans, so it may not find everything. Check these files separately and keep real personal data out of repositories.

Is it enough to delete personal data from a file?

Not always. It may still be in your Git history, backups or copies of the repository. Ask your privacy team what else needs to be done.

Which plan includes this scanner?

Included in every plan, including Free. Compare plans.

Try it on one of your repositories

Create a free account and run a scan. If you need Ultimate, self-hosting or a larger rollout, talk to our team.

No credit card needed. Read the documentation