Skip to content

fix(redaction): redact otp/verificationToken query params and document policy#68

Merged
Bccorb merged 1 commit into
mainfrom
fix/redaction-hardening
Jul 6, 2026
Merged

fix(redaction): redact otp/verificationToken query params and document policy#68
Bccorb merged 1 commit into
mainfrom
fix/redaction-hardening

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Closes #60

Summary

The central logger already redacts bootstrapToken=, token=, code=, state=, salt=, magic-link verify tokens, emails, and phone numbers (verified during the security survey). Two small follow-ups from that survey:

  • Add otp and verificationToken to the URL query-parameter redaction rule in src/utils/redaction.ts. No current route carries these in a query string, so this is defense-in-depth for future routes, not a live leak.
  • Surface the redaction policy in the main docs: a new "Logging and Redaction" section in docs/architecture.md, linking to the operator detail in production-operations.md.

Testing

  • New unit test asserts otp and verificationToken query params are redacted.
  • redaction.spec.ts passes; typecheck + lint clean.

…olicy

Add otp and verificationToken to the URL query-parameter redaction rule
so any future route that carries them in a URL is scrubbed from logs
(defense in depth; no current route does). Add a Logging and Redaction
section to the architecture doc so the policy is discoverable from the
main docs.

Closes #60
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Bccorb Bccorb merged commit ad13f6b into main Jul 6, 2026
2 of 3 checks passed
@Bccorb Bccorb deleted the fix/redaction-hardening branch July 6, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broaden request-URL redaction and surface the redaction policy in docs

2 participants