MCPcopy
hub / github.com/benborla/mcp-server-mysql / isPIIColumn

Function isPIIColumn

src/security/redact.ts:176–182  ·  view source on GitHub ↗
(
  key: string,
  columns: readonly string[] = DEFAULT_PII_COLUMNS,
  patterns: readonly RegExp[] = [],
)

Source from the content-addressed store, hash-verified

174 * OR across the two lists: any substring hit OR any regex hit flags the key.
175 */
176export function isPIIColumn(
177 key: string,
178 columns: readonly string[] = DEFAULT_PII_COLUMNS,
179 patterns: readonly RegExp[] = [],
180): boolean {
181 return matchPIIColumn(key, columns, patterns) !== null;
182}
183
184/**
185 * Mask a value matched by column-name heuristic. Tries specific pattern masks

Callers 5

createMcpServerFunction · 0.85
executeReadOnlyQueryFunction · 0.85
findFunction · 0.85
isPIIFunction · 0.85
redact.test.tsFile · 0.85

Calls 1

matchPIIColumnFunction · 0.85

Tested by 2

findFunction · 0.68
isPIIFunction · 0.68