How to verify webhook signatures: Stripe, GitHub, Slack

Every major webhook provider signs their requests with HMAC. Here's the working verification code for each, the timing-attack pitfall everyone hits, and a universal template.