Skip to content

verifyGitHubWebhookSignature

verifyGitHubWebhookSignature(input): boolean

Defined in: webhooks/webhooks.ts:29

Verifies a GitHub webhook delivery’s X-Hub-Signature-256 header — HMAC-SHA256 over the raw body, keyed by the webhook’s configured secret, timingSafeEqual-compared. https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries

Returns false (never throws) for any failure to verify — a missing/ empty secret, a missing/malformed signature header, or a mismatch — so the caller decides how to surface that (e.g. as its own error type).

string | Buffer<ArrayBufferLike>

string

string | undefined

boolean