Supporting "push to deploy" across multiple Git hosts sounds like a weekend feature: expose POST /api/webhooks/:id , check a signature header, parse the JSON body, and kick off a build.
Then the edge cases start piling up:
Gitea and Forgejo send X-GitHub-Event headers alongside their own headers—so checking GitHub first breaks signature verification for Gitea.
GitLab does not sign payloads with HMAC at all; it sends the raw shared secret in X-Gitlab-Token , where a naive === or length check leaks secret bytes and length via timing.
Returning 401 immediately when a webhook ID does not exist lets an attacker enumerate valid hook URLs by response latency.
Provider retries or captured payloads can trigger duplicate builds unless delivery IDs and timestamps are checked properly.
This is the design behind Git push webhook verification in Nitrobase ( services/git/webhooks.ts and features/git/webhook.server.ts ).
Nitrobase has only recently launched and is still in Beta .…