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).
Parameters
Section titled “Parameters”string | Buffer<ArrayBufferLike>
secret
Section titled “secret”string
signature
Section titled “signature”string | undefined
Returns
Section titled “Returns”boolean