Introduced a fixed mask length for password redaction, ensuring consistent output regardless of input length.#4
Conversation
… consistent output regardless of input length.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38dd8be69b
ℹ️ 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.
Pull request overview
This PR updates password redaction to use a fixed-length mask (defaulting to 8 asterisks) so logs no longer leak the original password length, and adds documentation/tests to reflect the new behavior.
Changes:
- Update
PasswordRedactionto emit a fixed-length mask (with configurable length viafrom(..., fixedMaskLength: N)). - Expand PHPUnit coverage to validate fixed-length masking for short/long values and custom mask length.
- Update README password redaction docs/examples; minor refactor in
EmailRedactionlocal variable ordering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tests/StructuredLoggerTest.php |
Updates existing password assertions and adds new tests for fixed-length masking and custom mask length. |
src/Redactions/PasswordRedaction.php |
Implements fixed-length masking and adds configurable fixedMaskLength with default. |
src/Redactions/EmailRedaction.php |
Reorders local variables in masking logic (no functional change intended). |
README.md |
Documents fixed-length password masking behavior and custom configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.