Groundskeeper
Research

PII core detector slice

Status: implemented as experimental built-ins, disabled by default Reviewed: 4 October 2026 (Australia/Sydney) Scope: email address and payment-card PAN; Australian phone explicitly deferred

Contract and action boundary

Detection returns exact Unicode-code-point spans and typed, value-free evidence. It never returns a matched value or value-derived fingerprint. Policy alone chooses record or redact; neither detector grants blocking authority.

  • Email (builtin.pii.email 0.2.0) is lexical and always candidate. Business and role addresses may be intentionally public, so a finding is not itself a recommendation to redact. The observe profile records only; the separately selected redact-experimental profile transforms the exact span.
  • Payment card (builtin.pii.payment-card 0.1.0) is validated_structured. Here validated means only accepted surface grammar, a conservative network shape, and Luhn. It never means that an issuer or account exists, that a card is active or owned by anyone, or that it can transact. Observe first; exact redaction is appropriate only in explicitly approved card-data paths.

Both manifests declare no network, filesystem, clock, or randomness capability. No DNS, MX, SMTP, BIN, issuer, processor, or account lookup occurs.

Email policy

The practical grammar accepts RFC 5321 ASCII dot-string and quoted-string local parts. It enforces the 64-octet local-part and practical 254-octet mailbox limits, requires a multi-label domain, and excludes address literals and local aliases. U-label and A-label domains are accepted only when Go golang.org/x/net/idna's non-transitional lookup profile validates IDNA labels, Bidi, ContextJ, and DNS lengths. The dependency is BSD-3-Clause.

SMTPUTF8 local parts are deliberately excluded. RFC 6531 permits them, but support would broaden token boundaries and scripts materially and needs its own multilingual corpus. Punycode is evidence of a syntactically valid IDNA domain, not proof that the domain is registered or safe.

Authoritative sources:

  • RFC 5321, sections 4.1.2 and 4.5.3.1 (mailbox grammar and octet limits).
  • RFC 5322, section 3.4.1 (addr-spec and dot-atom/quoted-string).
  • RFC 6531, section 3.3 (SMTPUTF8 and IDNA requirement).
  • golang.org/x/net/idna (BSD-3-Clause; IDNA lookup profile and Unicode tables).

Payment-card policy

The candidate grammar accepts 13–19 ASCII digits, contiguous or separated by one consistent ASCII space or hyphen, with maximal-run boundaries. It then requires Luhn and one of these conservative network shapes:

  • Visa: prefix 4, length 13, 16, or 19;
  • Mastercard: length 16 and prefix 51–55 or six-digit range 222100–272099;
  • American Express: prefix 34 or 37, length 15.

Other payment families are a known recall gap, not guessed from unofficial BIN tables. The detector rejects all-identical values, short repeated motifs, monotonic sequences, and a closed set of widely published processor test PANs. This lowers accidental test/log noise but cannot prove that another generated Luhn-valid value is not a test value.

Sources and licence boundary:

  • PCI SSC FAQ 1091 identifies payment-brand PAN lengths and safe truncation constraints. PCI DSS remains the governing operational source; this code does not reproduce the standard.
  • Mastercard 2-series issuer guidance publishes 222100–272099 and its equivalence to 51–55. Only Mastercard emits issuer_family evidence; Visa and American Express emit the weaker network_pattern evidence because equivalent brand-primary prefix material was not publicly available in this review.
  • ISO/IEC 7812 and ISO/IEC 7812-1 define the numbering system and check digit, but their full text is proprietary. The implementation uses only the public, interoperable facts above and the long-public Luhn algorithm; no ISO text or licensed BIN register is copied.

Issuer-family and network-pattern evidence is coarse and must not be used for routing, acceptance, fraud decisions, or issuer identification. Those require current licensed account-range data and processor authorization.

Why Australian phone is deferred

ACMA confirms that Australian mobile numbers have ten digits and start 04, but syntax alone does not provide libphonenumber-style possible/valid/type semantics across mobile, geographic, reserved and reassigned ranges. Google's libphonenumber is Apache-2.0 and the maintained Go port github.com/nyaruka/phonenumbers/v2 is MIT, so licensing is sound. The package also carries generated numbering metadata with an update lifecycle and a much larger dependency footprint. Adding it without a metadata pin/update policy, AU-specific hard-negative corpus, and action review would dilute this slice. See the ACMA numbering guidance, the Telecommunications Numbering Plan 2025, and libphonenumber.

Maturity and gaps

The checked-in gate record is NOT_READY. Public synthetic conformance, benign backgrounds, fuzz seeds, race tests, and a local benchmark are engineering evidence, not legacy G1 release-gate promotion. Missing evidence includes independently authored holdout and benign corpora at gate sample sizes, two-person annotation, observed precision review, privacy/legal approval, calibrated resource limits, and owner approval of action/severity. The default policy remains unchanged.

On this page