Add NameRedaction and PasswordRedaction classes with usage examples in README.md.#3
Add NameRedaction and PasswordRedaction classes with usage examples in README.md.#3gustavofreze merged 1 commit intomainfrom
Conversation
…ples in README.md.
There was a problem hiding this comment.
Pull request overview
This PR adds two new redaction classes (PasswordRedaction and NameRedaction) to the structured logger library, providing enhanced security capabilities for logging sensitive data. The changes follow established codebase patterns and maintain consistency with existing redaction implementations.
Changes:
- Adds
PasswordRedactionclass that fully masks password values with asterisks - Adds
NameRedactionclass that preserves the first N characters (default: 2) and masks the rest - Includes comprehensive test coverage with 10 new test cases following BDD-style conventions
- Updates README.md with usage examples and documentation for both new redaction types
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Redactions/PasswordRedaction.php | New redaction class implementing full value masking for password fields |
| src/Redactions/NameRedaction.php | New redaction class implementing prefix-preserving masking for name fields |
| tests/StructuredLoggerTest.php | Adds comprehensive test coverage (10 tests) for both new redaction classes and updates existing multi-redaction test |
| README.md | Adds documentation sections with usage examples for PasswordRedaction and NameRedaction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13212bb921
ℹ️ 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".
No description provided.