Skip to content

Add helper for masking sensitive fields before writing to structured logs #600

Description

@Chucks1093

Summary

Callback URLs and wallet addresses occasionally appear in log output when error context is captured naively. A shared masking helper should be applied before any structured log write to ensure sensitive fields never appear in plain text.

Scope

  • Add maskSensitive(obj: Record<string, unknown>): Record<string, unknown> helper
  • Mask any key matching: url, callback, address, webhook_url, recipient — replace value with [REDACTED]
  • Apply the helper in all structured log calls that accept an arbitrary context object
  • Add unit tests: masked key present → [REDACTED], unmasked key → value unchanged, nested object → nested keys masked

Acceptance Criteria

  • All listed key names masked to [REDACTED]
  • Non-sensitive keys unchanged
  • Nested objects masked recursively
  • Helper applied in all structured log context writes

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions