feat(triggers): add Zoom webhook triggers#3992
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces 6 new Zoom triggers (meeting started/ended, participant joined/left, recording completed, and Reviewed by Cursor Bugbot for commit 3813931. Configure here. |
Greptile SummaryThis PR adds 6 Zoom webhook triggers (meeting started/ended, participant joined/left, recording completed, and a generic catch-all) with a complete security implementation including challenge-response validation and HMAC-SHA256 signature verification.
Confidence Score: 5/5This PR is safe to merge — all prior security concerns have been resolved and the implementation follows established patterns All previously identified P0/P1 issues (HMAC oracle attack, replay attack window, fail-open authentication, missing mandatory challenge signature check) have been addressed per prior review threads. The dynamic import pattern in matchEvent is consistent with the established codebase convention across jira.ts, github.ts, intercom.ts, and others. No new P0 or P1 findings identified. No files require special attention Important Files Changed
Sequence DiagramsequenceDiagram
participant Z as Zoom
participant R as Webhook Route
participant ZH as zoomHandler
participant DB as Database
participant Q as Job Queue
Z->>R: POST /api/webhooks/trigger/{path}
R->>R: parseWebhookBody() → {body, rawBody}
R->>ZH: handleChallenge(body, request, requestId, path)
alt event = endpoint.url_validation
ZH->>ZH: check x-zm-signature + x-zm-request-timestamp
note over ZH: Reject if headers missing
ZH->>DB: SELECT webhook WHERE path AND provider='zoom'
DB-->>ZH: webhook record with secretToken
ZH->>ZH: validateZoomSignature(secretToken, sig, ts, JSON.stringify(body))
alt signature valid
ZH-->>R: NextResponse({plainToken, encryptedToken})
R-->>Z: 200 + challenge response
else invalid / no secret
ZH-->>R: null
R-->>Z: 401
end
else not a challenge
ZH-->>R: null
end
R->>R: findAllWebhooksForPath(path)
loop for each matching webhook
R->>ZH: verifyAuth({request, rawBody, providerConfig})
alt secretToken missing
ZH-->>R: 401 Unauthorized
else sig/ts headers missing
ZH-->>R: 401 Unauthorized
else HMAC mismatch OR timestamp delta > 300s
ZH-->>R: 401 Unauthorized
else all checks pass
ZH-->>R: null (continue)
end
R->>ZH: matchEvent({body, providerConfig})
ZH->>ZH: isZoomEventMatch(triggerId, body.event)
alt event matches trigger ID
ZH-->>R: true
R->>Q: enqueueWebhookExecution()
R-->>Z: 200 OK
else no match
ZH-->>R: false
R->>R: skip workflow
end
end
Reviews (8): Last reviewed commit: "fix(triggers): increase Zoom timestamp t..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
|
@cursor review |
|
@greptile |
… signature verification Add 6 Zoom webhook triggers (meeting started/ended, participant joined/left, recording completed, generic webhook) with full Zoom protocol support including endpoint.url_validation challenge-response handling and x-zm-signature HMAC-SHA256 verification.
- Add 30s timestamp freshness check to prevent replay attacks - Return null from handleChallenge when no secret token found instead of responding with empty-key HMAC - Remove all `as any` casts from output builder functions
- verifyAuth now fails closed (401) when secretToken is missing - handleChallenge DB query filters by provider='zoom' to avoid cross-provider leaks - handleChallenge verifies x-zm-signature before responding to prevent HMAC oracle
291f79c to
bd0a5aa
Compare
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 291f79c. Configure here.
|
@greptile |
|
@cursor review |
…ding page data - isZoomEventMatch now returns false for unrecognized trigger IDs - Update integrations.json with 6 Zoom triggers
|
@greptile |
|
@cursor review |
|
@cursor review |
|
@greptile |
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3813931. Configure here.
Summary
endpoint.url_validationchallenge-response protocol andx-zm-signatureHMAC-SHA256 signature verificationType of Change
Testing
Tested manually
Checklist