mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-08-13 08:22:36 +01:00
Store repository URLs may contain userinfo credentials (e.g. https://x-access-token:<token>@github.com/...) so Supervisor can clone private app repositories. These URLs currently end up verbatim in Sentry events: in captured exception messages, in log messages sent as breadcrumbs, and in the store repositories context that is attached to every event, leaking the embedded secrets. Sentry events for the duplicate-repository-add error (SUPERVISOR-1JYE) show GitHub personal access tokens of affected installations. Add sanitize_url_credentials() alongside the existing sanitize_url() and use it in the before_send filter to remove credentials from exception values, log entries, breadcrumbs and the store repositories context. This also covers messages produced outside Supervisor, like git's stderr in GitPython exceptions. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>