Repository navigation
🕵️ fix: Redact Email Addresses and IPs From Auth Flow Logs - #16994
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90cde286b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b16ad237ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
The registration, email verification, resend verification and password reset paths in
AuthServiceinterpolated the user's email into info, warn and error logs, the reset request for an unknown address also loggedreq.ip, and a registration validation failure logged the whole raw request body (email, name, username). The email change flow inpackages/api/src/auth/email.tslogged old and new addresses the same way.These logs now identify the user by opaque id where one exists and omit the address when no user was found. The anonymous reset lookup no longer logs the IP, and the validation failure logs only the validation message. The email change audit lines keep the user id and IP, since those are a security trail for account changes, but drop the addresses. Redaction stays at the call sites rather than changing the global log format.
Stacked on #16993.
Type of change
Testing
Tested environments/configuration:
Automated tests:
api:npx jest server/services/AuthService.spec.js: 72 passed, including a new test that the validation-failure log carries no email, username or name.packages/api:npx jest src/auth/email: 55 passed.npx tsc --noEmit -p packages/api/tsconfig.json: no errors.npx eslintandnpx prettier --checkon changed files: clean.Screenshots / recordings
No user-facing change
Risk / compatibility
Operators who grep logs by email address will now need to search by user id instead.
Checklist