2026-03-25

The PII pack, and why we bother checking the Luhn digit

Most of the PII pack is pattern matching you’d expect: email shapes, US phone number formats, national ID formats. The one piece worth explaining is payment cards, because it’s tempting to just match “16 digits in a row” and call it done — and that’s exactly what produces a wall of false positives on order numbers, tracking numbers, and random 16-digit identifiers that aren’t cards at all.

The Luhn checksum

Real payment card numbers satisfy a specific checksum (the Luhn algorithm) — a simple, publicly documented arithmetic check card issuers use to catch typos. A random 16-digit string only satisfies it by chance, about one time in ten. Requiring the checksum to pass before a match counts as a real card number cuts a large share of the false positives a bare digit-count pattern would produce.

What “PII” covers here

Not a fuzzy “sensitive-sounding text” classifier — a fixed list of pattern-matched categories: email addresses, US phone numbers, US national ID (SSN) shapes, and payment card numbers with the Luhn check. Each is its own rule, independently toggleable in shadow or enforce mode from the Rules browser.

Why this matters for an agent specifically

A human pasting a real card number into a command usually notices. An agent executing a multi-step task doesn’t necessarily pause to ask whether that string it just read out of a file should be in a shell command at all — which is exactly the gap this pack closes.

← Back to blog