Skip to content

Redact encryption keys from debug logs - #1587

Merged
Ernst79 merged 1 commit into
custom-components:masterfrom
IoannisArmamentos:fix/redact-encryption-key-logs
Sep 8, 2026
Merged

Redact encryption keys from debug logs#1587
Ernst79 merged 1 commit into
custom-components:masterfrom
IoannisArmamentos:fix/redact-encryption-key-logs

Conversation

@IoannisArmamentos

Copy link
Copy Markdown
Contributor

Summary

Prevent BLE device encryption keys from being exposed in Home Assistant debug logs.

Problem

Several config-flow debug statements logged configuration dictionaries directly.

These dictionaries can contain the device encryption_key, either directly while adding a device or nested inside stored/imported device configuration.

When debug logging is enabled, the key could therefore be written to Home Assistant logs and potentially exposed when logs are shared for troubleshooting.

Fix

Redact encryption keys before logging configuration data.

The redaction handles both direct and nested device configuration without modifying the original input or stored configuration.

Non secret configuration fields remain available in debug logs, and config flow behavior is unchanged.

@Ernst79
Ernst79 merged commit 91710c0 into custom-components:master Sep 8, 2026
6 checks passed
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.

2 participants