Skip to content

Stop logging hub auth token#201

Open
matt-richardson wants to merge 1 commit into
sanjoyg:mainfrom
matt-richardson:fix/token-logging
Open

Stop logging hub auth token#201
matt-richardson wants to merge 1 commit into
sanjoyg:mainfrom
matt-richardson:fix/token-logging

Conversation

@matt-richardson

Copy link
Copy Markdown

A quick "hey claude, is this plugin safe to use" scan highlighted that the options flow

  • logged the bearer token directly (logger.error(token)) and
  • dumped the full user_input dict (which contains CONF_TOKEN) at ERROR level in two places.

The token is long-lived and grants full control of the hub, so should never be logged.
The README also instructs users to paste HA logs into public GitHub issues, risking leakage

Results

Describe your changes

This PR removes the token (line 212) and user_input (218) logging and downgrades the surrounding diagnostic chatter from error to debug.

Checklist before submitting a pull request

  • Updated base lib and added the required version in the requirements.txt and manifest.json N/A (i think?)

Checklist for reviewer

  • Select "Squash and merge" to keep commit timeline clean

The options flow logged the bearer token directly (logger.error(token))
and dumped the full user_input dict — which contains CONF_TOKEN — at
ERROR level in two places. The token is long-lived and grants full
control of the hub, and the README instructs users to paste HA logs into
public GitHub issues, so this risked leaking hub control to anyone
reading a bug report.

Remove the token/user_input logging and downgrade the surrounding
diagnostic chatter from error to debug. No token is written to logs at
any level now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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