feat: add configurable sensitive data masking in logs#873
Conversation
Added configuration option to control sensitive data masking in logs, allowing users to disable masking for debugging purposes while keeping it enabled by default for security. Configuration: - New `mask-sensitive-data` boolean config (default: true) - Available as global config and per-repository override - Reads from config via get_logger_with_params() Changes: - Updated helpers.py to read mask-sensitive-data from config - Added schema definition for new config option - Updated example configs (config.yaml, .github-webhook-server.yaml) - Added 3 comprehensive tests for masking behavior - Updated README.md with usage documentation and security warnings - Updated schema validator to include new boolean field Security: - Default remains true (masking enabled) for production safety - When disabled, exposes tokens, passwords, API keys, etc. in logs - Recommended only for development/debugging Testing: - Verified default masking works (sensitive data hidden) - Verified explicit disable works (sensitive data visible) - Verified explicit enable works (sensitive data hidden) - All 53 tests pass
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
WalkthroughThis PR introduces a new configuration option Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The changes follow a consistent homogeneous pattern (adding the same config option across files), but the logic modification in Possibly related issues
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
🧰 Additional context used🧬 Code graph analysis (2)webhook_server/tests/test_helpers.py (2)
webhook_server/utils/helpers.py (1)
🔇 Additional comments (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/approve |
Added configuration option to control sensitive data masking in logs, allowing users to disable masking for debugging purposes while keeping it enabled by default for security.
Configuration:
mask-sensitive-databoolean config (default: true)Changes:
Security:
Testing:
Summary by CodeRabbit
New Features
mask-sensitive-dataconfiguration option to control sensitive data masking in logs (enabled by default).Documentation