Repository navigation
feat(webhooks): enforce origin and audience claims on all webhook JWTs (Closes #2274) - #2312
Merged
github-actions[bot] merged 1 commit intoNov 24, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2274
Summary
backend/src/webhooks/jwt.ts: strict Base64URL + UTF-8 decoding (incl. astral/surrogate pairs),aud,orig,iss,exp/nbfvalidation against a compiled policy, origin normalization (scheme+host+port, http/https only), stable typed error codes, and metrics/logger observability hooks. Signature verification is delegated to the caller's JOSE layer.backend/src/webhooks/dispatcher.ts: gates webhook delivery on validated claims before invoking handlers, with signature + split hooks, handler registration, typed dispatch errors, and metrics/logger on every path.__tests__/jwt.test.ts(42 assertions) +__tests__/dispatcher.test.ts(7 assertions) covering happy paths and failure modes. Standalone Node-26 verification harness: 71/71 assertions pass.Acceptance criteria
.mdfiles).Payout addresses
0xC5dD2Ea54FF138bb3f71D3466092eA31eF115868DN3pfYEvdkoTBP4oaEVvemsr98fZPhDSAbfVfmewRGQ5ivanzenteno3@gmail.com