Files
supervisor/tests/misc
d8c87c4f2a Remove credentials from repository URLs in Sentry events (#7088)
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>
2026-07-28 15:43:38 +02:00
..