Skip to content

fix!: verify every endpoint the provider requests, not only the call webhook - #185

Merged
nafg merged 1 commit into
masterfrom
fix/verify-status-callbacks
Dec 4, 2026
Merged

nafg merged 1 commit into
masterfrom
fix/verify-status-callbacks

Conversation

@nafg

@nafg nafg commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

The request-verification middleware wrapped only the call webhook, so the recording-status and transcription callbacks accepted any request. Anyone who knew the CallSid of a call that was awaiting a recording could post a recording URL or transcription text of their choosing, and the call would carry on with it.

Now CallStateServer.routes applies the middleware to verifiedEndpoints, the endpoints the provider requests, and adds the diagnostic calls endpoint outside it. A subclass adds its endpoints to verifiedEndpoints and they are verified without it doing anything, so the status callbacks are verified too, and an endpoint added later can't be left out by mistake. That makes it correct by construction, so there's no test for it.

Breaking change: CallStateServer.allEndpoints is now verifiedEndpoints, and it holds only the endpoints the provider requests. An override returns its routes without applying the verification middleware itself.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: df0d052a-eeea-419c-9a0f-bf759c216d0f
Commits

Reviewing files that changed from the base of the PR and between 9bc8f5c and 0f93e7f.

Files selected for processing: 3

  • core/src/scala/io/github/nafg/dialoguestate/CallStateServer.scala
  • twilio-base-test/src/scala/io/github/nafg/dialoguestate/twilio/base/TestCall.scala
  • twilio-base/src/scala/io/github/nafg/dialoguestate/twilio/base/TwilioBaseCallStateServer.scala
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T03:16:38.714526Z 353093b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nafg
nafg added this pull request to stack #186 December 4, 2026 03:16
@mergify

mergify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

…webhook

The request-verification middleware wrapped only the call webhook, so the
recording-status and transcription callbacks accepted any request. Anyone
who knew the CallSid of a call that was awaiting a recording could post
a recording URL or transcription text of their choosing, and the call
would carry on with it.

Now `routes` applies the middleware to `verifiedEndpoints`, the endpoints
the provider requests, and adds the diagnostic `calls` endpoint outside
it. A subclass adds its endpoints to `verifiedEndpoints` and they are
verified without it doing anything, so the status callbacks are verified
too, and an endpoint added later can't be left out by mistake.

BREAKING CHANGE: `CallStateServer.allEndpoints` is now
`verifiedEndpoints`, and it holds only the endpoints the provider
requests. An override returns its routes without applying the
verification middleware itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nafg
nafg force-pushed the fix/verify-status-callbacks branch from 353093b to 0f93e7f Compare December 4, 2026 03:37
@nafg nafg changed the title fix(twilio-base): verify status callbacks the same way as the call webhook fix!: verify every endpoint the provider requests, not only the call webhook Dec 4, 2026
@nafg
nafg merged commit 78d4219 into master Dec 4, 2026
5 checks passed
@nafg
nafg deleted the fix/verify-status-callbacks branch December 4, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant