feat(s52): webhook errors never leak the secret-bearing URL

This commit is contained in:
Kjell Tore Guttormsen 2026-07-16 19:49:24 +02:00
commit c782c3402c
2 changed files with 36 additions and 2 deletions

View file

@ -122,4 +122,9 @@ class WebhookNotifier:
self._post = post
def __call__(self, verdict: Verdict) -> None:
self._post(self._url, json.dumps(_verdict_payload(verdict), sort_keys=True))
try:
self._post(self._url, json.dumps(_verdict_payload(verdict), sort_keys=True))
except (URLError, OSError) as exc:
# STRICTER than ingest.py:314: the message NEVER carries the url — a Slack/Teams
# webhook URL embeds the receiver secret (the original cause stays chained).
raise NotifyError("webhook POST failed") from exc