Repository navigation
fix(voice-call): bracket IPv6 webhook hosts - #115135
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 8:27 AM ET / 12:27 UTC. ClawSweeper reviewWhat this changesThe PR validates bracketed IPv6 webhook hosts, canonicalizes them for allowlist comparison, and restores brackets when rebuilding the URL used by Voice Call provider signature verification. Merge readiness✅ Ready for maintainer review This PR remains necessary: current Priority: P2 Review scores
Verification
How this fits togetherThe Voice Call plugin receives webhook requests from providers and may reconstruct their public URL from direct or trusted forwarded host headers before validating a provider signature. The reconstructed URL feeds Twilio and Plivo verification and determines whether a signed inbound call is accepted. flowchart LR
A[Inbound provider webhook] --> B[Host and forwarding headers]
B --> C[Trusted-host selection]
C --> D[Hostname normalization]
D --> E[Public webhook URL reconstruction]
E --> F[Twilio or Plivo signature verification]
F --> G[Accept or reject call webhook]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +20, Tests +116. Total +136 across 2 files. View PR surface stats
Review metricsNone. Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Rebase or merge the current Do we have a high-confidence way to reproduce the issue? Yes, from source: a valid bracketed IPv6 Host is reduced to a bare literal and then concatenated after Is this the best way to solve the issue? Yes. Separating normalized hostname comparison from URL-authority serialization is the narrowest maintainable fix: allowlist checks retain canonical bare IPv6 values while generated URLs use the required brackets. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2c5aff01f62d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…ipv6-webhook-host
|
Merged via squash.
|
…etwork-none * origin/main: (24 commits) refactor(sessions): isolate legacy transcript fixtures (#115231) fix(discord): clear pending launch watchdog (#115100) fix(agents): stop quadratic subagent prompt rendering (#115263) fix(memory-core): recover dreaming cron reconciliation (#115174) fix(qa-lab): filter incompatible channel scenarios (#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership chore(i18n): refresh gateway discovery catalogs fix(i18n): include shared discovery copy in macOS catalog fix(apple): localize gateway discovery status chore(i18n): drop release-owned changelog entry fix(macos): localize privacy permission prompts fix(voice-call): bracket IPv6 webhook hosts (#115135) test(ci): split control UI scope coverage fix(ui): detect composed accessibility copy fix(ci): run localization checks for UI changes test(ui): catch untranslated accessibility labels fix(ui): localize chat action labels fix(ui): localize chat status indicators fix(ui): sync document locale metadata ...
…-20260728 * origin/main: (21 commits) refactor(sessions): isolate legacy transcript fixtures (#115231) fix(discord): clear pending launch watchdog (#115100) fix(agents): stop quadratic subagent prompt rendering (#115263) fix(memory-core): recover dreaming cron reconciliation (#115174) fix(qa-lab): filter incompatible channel scenarios (#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership chore(i18n): refresh gateway discovery catalogs fix(i18n): include shared discovery copy in macOS catalog fix(apple): localize gateway discovery status chore(i18n): drop release-owned changelog entry fix(macos): localize privacy permission prompts fix(voice-call): bracket IPv6 webhook hosts (#115135) test(ci): split control UI scope coverage fix(ui): detect composed accessibility copy fix(ci): run localization checks for UI changes test(ui): catch untranslated accessibility labels fix(ui): localize chat action labels fix(ui): localize chat status indicators fix(ui): sync document locale metadata ...
Co-authored-by: IWhatsskill <[email protected]>
[AI-assisted]
What Problem This Solves
Voice Call webhook reconstruction removed brackets from a valid IPv6 Host header for comparison and then inserted the bare colon-containing address into the URL authority. The resulting value, such as
https://2001:db8::1/voice/webhook, was not a valid public webhook URL for the existing verification path.Failure mode
A bracketed IPv6 Host was normalized to a bare address, then concatenated after
https://without restoring brackets. Malformed bracket contents or trailing text were also accepted by the bracket branch instead of falling through safely.Why This Change Was Made
Bracketed Host values are now accepted only when their contents are an IPv6 literal that the native URL owner can serialize and any suffix is an optional numeric port. The normalized bare address remains available for allowed-host comparison, while URL serialization restores the required brackets.
Root Cause
The same normalized hostname representation was used for both allowlist comparison and URL serialization even though an IPv6 URL authority requires brackets.
Runtime ownership
Voice Call's
reconstructWebhookUrlcontinues to own trusted header selection and path reconstruction.extractHostnameowns validation and normalized comparison keys; the new formatter owns only URL-authority serialization.User Impact
Voice Call deployments using a direct or trusted forwarded IPv6 Host now supply a valid bracketed public URL to the existing signature verifier. Existing forwarding trust, domain and IPv4 handling, port stripping, fallback order, redacted diagnostics, and replay behavior remain unchanged.
Evidence
Validated at exact head
126ffc1b78bec68178b196d7e852ceb72f2bcef4: a running Voice Call webhook accepted a valid Plivo V3 HMAC through a trusted IPv6 proxy/Host path with HTTP 200 and rejected the invalid-signature control with HTTP 401; 40/40 focused tests also passed.Inspect exact-head proof ledger
Provenance
f4da74a0af4e2390551e637f42e1693182f372a9126ffc1b78bec68178b196d7e852ceb72f2bcef4mainDirect behavior
[::1]; the trusted loopback proxy forwarded the expanded host[2001:0db8:0000:0000:0000:0000:0000:0001]:8443, while the HMAC was signed for the canonically equivalent URLhttps://[2001:db8::1]/voice/webhook?flow=xml-listen&callId=ipv6-proof. Result: the valid signed request returned HTTP 200 with a Plivo XML response, while the deliberately corrupted signature returned HTTP 401; the HMAC secret was ephemeral and redacted and no external provider request occurred. Proves a running after-fix Voice Call webhook accepts a valid signature through the configured trusted proxy and equivalent IPv6 Host spellings, and still fails closed for an invalid signature. Preserves signature enforcement, trustedProxyIPs gating, allowed-host validation, provider response handling, and the no-external-network proof boundary.Redacted exact-head IPv6 webhook runtime output
Automated verification
Focused Voice Call webhook security
node scripts/run-vitest.mjs extensions/voice-call/src/webhook-security.test.ts --run --reporter=verbose— 1 test file and 40 tests passed with 0 failures and 0 skips. Proves native IPv6 URL parsing, canonical allowlist comparison, Twilio and Plivo HMAC integration, malformed-host fallback, trusted-proxy matching, replay behavior, and diagnostic redaction remain correct. Preserves Twilio, Telnyx, and Plivo verification; forwarding trust; replay handling; port variants; and domain-host behavior.Focused static verification
git diff --check origin/main...HEAD— completed with exit code 0 and no output. Proves the refreshed Base-to-HEAD patch has no whitespace errors. Preserves the exact two-file PR surface.Preserved boundaries
Proof gap
A live external carrier delivery was not run because no carrier credentials are used in the proof environment. The actual production webhook server and provider verifier processed real HTTP through a real IPv6-bound trusted proxy with an ephemeral HMAC secret, proving the changed local security boundary. No external carrier interoperability or deployment claim is made.
Artifacts