Ready. Paste logs, CSV, or JSON or click "Load Sample Data".
Total Masked
0
API / JWT Secrets
0
Financial (Card/IBAN)
0
Network / Email
0

Detection Audit Trail

Category Rule Line:Col Length Replacement
No scan executed yet.

Technical Reference: Deterministic PII & Credential Sanitization

Incident response teams, SREs, and FinOps analysts routinely need to share raw JSON payloads, webhook logs, or CSV extracts with external ticket systems or diagnostic assistants. Uploading unredacted payloads creates immediate compliance exposure under GDPR Article 32, PCI-DSS Requirement 3.4, and SOC 2 confidentiality controls. The ZERO.OPS Browser PII Scrubber resolves this risk by running deterministic tokenizers, mathematical check-digit validators, and non-overlapping span replacement completely inside client memory.

1. Payment Card Verification via the Luhn Mod-10 Invariant

Naive regular expressions matching 13 to 19 digits generate severe false-positive noise on Unix millisecond timestamps, tracking numbers, and UUID decimals. Every numeric candidate extracted by the scrubber is normalized by stripping whitespace and hyphens, rejected if all digits are identical, and verified against the ISO/IEC 7812 Luhn check equation. Numbering digits from right to left starting at index zero:

S = sum_{i=0}^{n-1} f(d_i, i) mod 10 = 0, where f(d, i) = d if i is even; else (2*d if 2*d < 10 else 2*d - 9)

Only sequences where S mod 10 equals zero are classified as valid Primary Account Numbers (PANs). For example, the synthetic test card 4532-0151-1283-0366 evaluates to a Luhn sum of 50 (valid), whereas changing the final check digit to 7 yields 51 and is deterministically ignored as a non-card identifier.

2. International Bank Account Number (IBAN) MOD-97 Validation

Similar to payment cards, alphanumeric strings starting with two uppercase letters and two digits can appear in build hashes or SKU codes. Before masking an IBAN candidate, the engine enforces ISO 13616 structural length bounds (15 to 34 characters), moves the 4-character country and check-digit prefix to the tail, maps letters A through Z to integers 10 through 35, and computes streaming modular arithmetic without 64-bit integer overflow:

R_{k+1} = (R_k * 10^{w} + val(c_k)) mod 97, valid iff R_{final} == 1 (w = 1 for digits, w = 2 for A-Z)

Processing digits iteratively modulo 97 avoids JavaScript IEEE-754 precision loss above 2^53 - 1, ensuring exact validation across 34-character IBANs such as German, French, and Dutch settlement accounts.

3. High-Precision Cloud Secret & Token Grammars

Modern cloud providers embed deterministic prefixes in API credentials to support static secret scanning. The scrubber matches AWS IAM access key IDs (AKIA and ASIA prefixes followed by 16 uppercase alphanumeric characters), labeled AWS secret access keys (40-character base64 strings), Stripe live and test keys (sk_live, pk_live, rk_live), GitHub classic and fine-grained personal access tokens (ghp_, gho_, ghu_, ghs_, ghr_, github_pat_), OpenAI project/service keys (sk-proj-, sk-svcacct-), and three-segment base64url JSON Web Tokens (eyJ...eyJ...sig).

4. Priority-Ordered Non-Overlapping Span Resolution

When multiple rules match intersecting byte ranges—for instance, a base64 JWT segment containing digits that resemble another identifier, or an email local part containing IPv4-like octets—naive sequential regex replacement corrupts output boundaries. ZERO.OPS collects every candidate span [start, end) with its rule priority and length, sorts candidates by priority descending and span length descending, and greedily accepts strictly disjoint intervals before assembling the sanitized string in a single forward pass.

5. Correlation-Preserving FNV-1a Pseudonymization

Standard redaction replaces every secret with a static placeholder, which breaks log correlation when tracing whether the same IPv4 address or user email triggered multiple downstream failures. Selecting FNV-1a Hash Pseudonym mode maps each matched token deterministically to an 8-hex-digit digest using the 32-bit Fowler-Noll-Vo offset basis (0x811c9dc5) and prime (0x01000193):

H_{i+1} = ((H_i XOR byte_i) * 16777619) mod 2^{32} --> [HASH:CATEGORY:xxxxxxxx]

Engineers retain exact cardinality and session-grouping fidelity across thousands of log lines without exposing underlying customer identifiers or credentials.

6. CSV, NDJSON, and Log Line-Coordinate Auditing

Every masked match is indexed against a binary-searched newline offset table to report exact one-based line:column coordinates and token lengths inside the Detection Audit Trail table. This enables compliance engineers to verify why a string was classified (for example, distinguishing a Luhn-verified payment card from an unmasked tracking reference) and audit sanitization coverage across multi-megabyte log exports before uploading diagnostics to support queues.