You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redact secrets when logging config and warn user when changing categories (#19966)
Closes#19465
Summary of the issue:
Secrets stored in NVDA config are often unintentionally logged in debug mode by NVDA
Description of user facing changes:
logging will attempt to redact secrets when the developer decides to sanitise risky log messages.
Added a new log level: secrets, to disable redactions for required debug logging.
Added a warning whenever selecting a log level below info.
Description of developer facing changes:
A new redactSecrets parameter for logging, which searches for and replaces secrets in the log message.
Description of development approach:
Use Yelp/detect-secrets
This pull request introduces secret redaction support in logging, ensuring that sensitive information is masked in log outputs when requested.
A new log level is added so you can view unredacted logs if needed.
Secret Redaction in Logging
Added a redactSecrets parameter to the Logger._log method in logHandler.py that, when enabled, uses the detect-secrets library to scan and mask detected secrets in log messages.
Updated logging calls in source/config/__init__.py to use redactSecrets=True when logging potentially sensitive configuration data.
Updated the developer documentation to describe the new redactSecrets parameter and recommend its use for sensitive data.
Dependency and Packaging Support
Added detect-secrets as a dependency in pyproject.toml and ensured all relevant submodules are included in frozen builds for dynamic plugin loading
Include multiprocessing in bundle - needed for import, seems to functionally work?
0 commit comments