You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(security): memoized token scanner in PiiMasker.detectPiiColumn eliminating dynamic RegExp and split/join #1540
A third dynamic regex (RegExp(r'(^|_)(api|private|access|secret|auth)_key($|_)')).
For 30 columns, this generates over 250 temporary heap objects per query execution.
Solution
Add a static thread-safe LRU/cache map (_piiCache) since standard database column names (id, name, created_at, status, etc.) are highly repetitive.
Replace regex transformations with a simple character scanner on ASCII code units (codeUnitAt).
Benefits
Instant O(1) cache hits for recurring column names.
Zero regex compilations and zero split/join allocations during PII masking.
Activity
Merge pull request #1608 from QueryaHub/issue/1540-pii-masker