feat(s52): webhook errors never leak the secret-bearing URL
This commit is contained in:
parent
61c4cb2d26
commit
c782c3402c
2 changed files with 36 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue