Repository navigation
fix(vcs): verify the GitHub webhook signature before fanning the event out - #14771
Conversation
…t out preprocessEvent() ran before the x-hub-signature-256 HMAC check. The base hook is a no-op, but Cloud overrides it to fan the event out to every region, so an unauthenticated POST triggered N cross-region forwards (and relayed arbitrary caller headers) before any signature validation. Move the call to after the signature-valid check so only validly-signed deliveries are preprocessed. Refs appwrite-labs/cloud#6767 Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Review complete. No issues found — approved ✅. The change reorders the GitHub webhook event handler so that the
Reviewed commit: aa64cf3 |
🟢 Tier S · Ready to mergeThe GitHub webhook action now verifies
📂 Walkthrough · 1
Reviewed |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
…fter-verify fix(vcs): verify the GitHub webhook signature before fanning the event out (cherry picked from commit 518749a)
What
preprocessEvent()ran before thex-hub-signature-256HMAC check in the GitHub webhook action. The base hook is a no-op, but Cloud overrides it to fan the event out to every region — so an unauthenticatedPOST /v1/vcs/github/eventstriggered N cross-region HTTPS forwards (coroutine batch, 20s timeout, up to 5 redirects) and relayed arbitrary caller headers between regions, all before any signature validation. Receivers re-verify, so this is an unauthenticated amplification / header-relay vector, not an auth bypass.Moves the
preprocessEvent()call to after the signature-valid check, so only validly-signed deliveries are fanned out. The basepreprocessEventis a no-op, so only Cloud's fan-out timing changes.Tracked in appwrite-labs/cloud#6767.
🤖 Generated with Claude Code