Description
Configure custom Pino logger serializers to sanitize sensitive request and response headers (such as Authorization tokens or SEP-10 JWTs) from application log output.
Context & Requirements
Security best practices dictate that authentication credentials and sensitive tokens must never appear in log files. Pino supports custom serializers to scrub or redact headers before logs are written.
Acceptance Criteria
Implementation Guidance
- Likely files to touch: logger setup module (e.g.,
src/lib/logger.ts or src/index.ts).
- Refer to Pino documentation on custom serializers and redaction paths.
Testing & Validation
- Run
npm test and verify application starts and logs correctly without errors.
Submission Guidelines
- Open a Pull Request referencing
Closes #<issue-number>.
- Adhere to TypeScript strict rules and existing codebase formatting standards.
Wave complexity: Trivial
Description
Configure custom Pino logger serializers to sanitize sensitive request and response headers (such as Authorization tokens or SEP-10 JWTs) from application log output.
Context & Requirements
Security best practices dictate that authentication credentials and sensitive tokens must never appear in log files. Pino supports custom serializers to scrub or redact headers before logs are written.
Acceptance Criteria
src/to include custom serializers for req/res objects.Authorizationand cookie headers are redacted or masked in log output.Implementation Guidance
src/lib/logger.tsorsrc/index.ts).Testing & Validation
npm testand verify application starts and logs correctly without errors.Submission Guidelines
Closes #<issue-number>.Wave complexity: Trivial