Skip to content

Reduce debug messages; avoid printing DB passwords in log output#2026

Open
GernotMaier wants to merge 15 commits intomainfrom
debug-messages
Open

Reduce debug messages; avoid printing DB passwords in log output#2026
GernotMaier wants to merge 15 commits intomainfrom
debug-messages

Conversation

@GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Feb 6, 2026

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

@GernotMaier GernotMaier self-assigned this Feb 6, 2026
@GernotMaier
Copy link
Contributor Author

sonarq is a smartie - I suppress these messages.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RedactFilter logging 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

GernotMaier and others added 9 commits February 6, 2026 11:45
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>
@GernotMaier GernotMaier marked this pull request as ready for review February 6, 2026 11:28
@ctao-sonarqube
Copy link

ctao-sonarqube bot commented Feb 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant