MCPcopy
hub / github.com/infinitered/reactotron / storageKeyIsSensitive

Function storageKeyIsSensitive

lib/reactotron-mcp/src/redaction.ts:418–424  ·  view source on GitHub ↗

* Check whether a storage key (e.g. "auth:password", "auth_password", "user.api_key") * contains any sensitive key name as a case-insensitive substring.

(storageKey: string, sensitiveKeysLower: Set<string>)

Source from the content-addressed store, hash-verified

416 * contains any sensitive key name as a case-insensitive substring.
417 */
418function storageKeyIsSensitive(storageKey: string, sensitiveKeysLower: Set<string>): boolean {
419 const keyLower = storageKey.toLowerCase()
420 for (const sensitive of sensitiveKeysLower) {
421 if (keyLower.includes(sensitive)) return true
422 }
423 return false
424}
425
426/**
427 * Redact AsyncStorage mutation payloads. The storage key carries the

Callers 1

redactAsyncStorageItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected