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
{{ message }}
Repository navigation
[BUG] IPInfo token and the Redis URL reach logs and telemetry events #80
IPInfo token.ipinfo_handler.py:147 puts it in the query string:
url=f"{base_url}?token={self.token}"
response.raise_for_status() on a non-2xx raises aiohttp.ClientResponseError,
whose str() embeds the full URL. That string is interpolated into the failure
log and into the geo_lookup_failed telemetry event reason
(ipinfo_handler.py:103, :215). Any 401, 403 or 429 from ipinfo.io writes the
token to the log — and a 401 is precisely what a rotated or mistyped token
produces, so the failure that reveals the secret is the common one.
IPInfo accepts Authorization: Bearer <token>, which keeps it out of the URL.
The error string should be reduced to host and status either way.
Redis URL.redis_handler.py:106,118 passes redis_url=self.config.redis_url into the connect and reconnect telemetry
events. redis://:PASSWORD@host:6379 is the documented URL form, so on a
password-protected instance the credential goes to the agent on every connect
and every reconnect — that is, most often when Redis is flapping.
Strip userinfo before including it (urlunsplit with the netloc rewritten), or
send host and port only.
Found while re-checking a private audit against the current release. Verified on guard-core 3.13.0, CPython 3.14.
One precision: guard-core itself does not write the token to a log line. The leak is the reason of the geo download-failed and lookup-failed telemetry events (and whatever the host application logs from SecurityEvent.reason), via aiohttp.ClientResponseError.__str__ embedding the full URL. Same for the Redis URL: it rides in event metadata on connect and reconnect, and the agent transport does no redaction.
Fix in 3.14.0: Authorization: Bearer for IPInfo, error reasons reduced to exception type plus status, and userinfo stripped from redis_url before it reaches any event.
The IPInfo token is sent as an Authorization: Bearer header and never echoed in logs or telemetry; RedisManager.initialize strips userinfo from redis_url before it reaches any event.
Activity
rennf93 commentedon Aug 25, 2026
Thanks @RomanPszonka for opening the issue! By @rennf93's directive:
Reproduced both.
One precision: guard-core itself does not write the token to a log line. The leak is the
reasonof the geo download-failed and lookup-failed telemetry events (and whatever the host application logs fromSecurityEvent.reason), viaaiohttp.ClientResponseError.__str__embedding the full URL. Same for the Redis URL: it rides in event metadata on connect and reconnect, and the agent transport does no redaction.Fix in 3.14.0:
Authorization: Bearerfor IPInfo, error reasons reduced to exception type plus status, and userinfo stripped fromredis_urlbefore it reaches any event.rennf93 commentedon Aug 26, 2026
Shipped in guard-core 3.14.0 (PyPI), merged in #82 (500d4ef).
The IPInfo token is sent as an
Authorization: Bearerheader and never echoed in logs or telemetry;RedisManager.initializestrips userinfo fromredis_urlbefore it reaches any event.