Skip to content

Add structured logging redaction for PII in app/lib/logger.ts #420

Description

@greatest0fallt1me

Description

This is a backend issue. app/lib/logger.ts logs request bodies that may contain Stellar memo PII. Add a redaction layer that masks emails, phone numbers, and long base32 strings except first/last 4.

Requirements and Context

  • Redaction in serializer
  • Tests with sample payloads
  • Allowlist for explicit log fields
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested Execution

  1. Fork the repo and create a branch
    git checkout -b bug/logger-pii-redaction
  2. Implement changes
    • app/lib/logger.ts
    • app/lib/privacy.ts
  3. Test and commit
    • npm test -- logger privacy
    • Include test output and notes in the PR

Example commit message

fix: redact PII in structured logs

Acceptance Criteria

  • PII masked
  • Tests cover patterns
  • No perf regression

Guidelines

  • Allowlist over denylist
  • Clear documentation and inline comments
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

GRANTFOX OSSGrantFox open-source campaign taskOFFICIAL CAMPAIGNOfficial GrantFox campaign issueStellar WaveIssues in the Stellar wave programbackendBackend service worksecuritySecurity hardening

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions