# Function sanitizeParams

- sanitizeParams(
  params: Record<string, unknown>,
  sensitiveKeys?: readonly string[],
  ): Record<string, unknown>

  Returns a copy of `params` with sensitive values replaced by `'[REDACTED]'`.

  Only top-level keys are inspected. Nested objects are passed through unchanged, so callers should sanitise nested params separately if needed.

  #### Parameters

  - params: Record<string, unknown>

    Original parameter map

  - sensitiveKeys: readonly string[] = DEFAULT_SENSITIVE_KEYS

    Keys to redact (defaults to DEFAULT_SENSITIVE_KEYS)

  #### Returns Record<string, unknown>

  Sanitised copy of `params`

  #### Security

  This function does NOT recurse into nested objects. Callers are responsible for sanitising nested parameter structures.

  #### Since

  0.9.0

  - Defined in utils/auditSink.ts:155