Reduce debug messages; avoid printing DB passwords in log output#2026
Reduce debug messages; avoid printing DB passwords in log output#2026GernotMaier wants to merge 15 commits intomainfrom
Conversation
|
sonarq is a smartie - I suppress these messages. |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #1980 by reducing verbose debug output and implementing a security filter to prevent database passwords from being logged in clear text. The changes include removing low-value debug messages from initialization and validation functions, and adding a RedactFilter class that automatically redacts sensitive information from log output using both environment variable matching and pattern-based detection.
Changes:
- Implemented
RedactFilterlogging filter to redact passwords and sensitive keys from log messages - Removed verbose debug messages from schema validation, model initialization, and runner classes
- Added comprehensive test coverage for the redaction filter
- Updated pylint configuration to allow classes with single public methods
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/simtools/application_control.py | Added RedactFilter class and _apply_redact_filter_globally() function to redact sensitive information from logs |
| src/simtools/data_model/schema.py | Removed debug message from validate_deprecation_and_version function |
| src/simtools/model/legacy_model_parameter.py | Removed debug message and added pylint disable comment for unused argument |
| src/simtools/model/calibration_model.py | Removed initialization debug message |
| src/simtools/runners/corsika_runner.py | Removed initialization debug message |
| src/simtools/simtel/simtel_config_writer.py | Removed debug message from write_dummy_telescope_configuration_file |
| tests/unit_tests/test_application_control.py | Added comprehensive tests for RedactFilter functionality |
| tests/unit_tests/model/test_calibration_model.py | Removed assertion for debug message that no longer exists |
| pyproject.toml | Set min-public-methods = 1 to allow utility classes with single public methods |
| docs/changes/2025.maintenance.md | Added changelog entry documenting the changes |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|




Reduce verbose debug messages, especially from schema and init messages.
Add filter to log output to avoid printing DB password in clear text to log output.
Partly addresses #1980