voip.ms API credentials leak into logs on every send and into the observability DB on failure #46
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#46
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
_send_voipms_sms(app/services/notifiers/sms.py:141-166) sendsapi_username/api_passwordas GET query parameters. httpx logs every requestURL (query string included) at INFO, and app logging is INFO
(app/main.py:21-24), so credentials hit the logs on every send. On non-2xx,
response.raise_for_status()raises an error whose message embeds the fullURL; it is logged and persisted unredacted via
_record_sms_delivery→record_notifier_delivery, surfacing on the admin diagnostics page.Fix: switch the voip.ms call to POST with credentials in the body; scrub URL
query strings from any exception text before logging/persisting delivery
errors (apply the scrubber in
_record_sms_deliveryandrecord_notifier_deliveryso all notifiers benefit). Rotate the voip.ms APIpassword after deploying the fix.
Acceptance criteria:
Filed from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-07.Fixed in #93 (merged to
main). The voip.ms call now POSTs credentials in the request body (out of the URL entirely), a centralscrub_secrets()strips URLs/credential params from persisted notifier errors inrecord_notifier_delivery(so all channels benefit), and httpx request logging is lowered to WARNING so full request URLs aren't logged at INFO. Tests confirm a failed voip.ms send records/logs no password, username, or query string.⚠️ Operational action still required: rotate the voip.ms API password — it may already be present in historical container logs and the observability DB from before this fix.