Skip to content

fix(sdk): webhooks-django × codex-baseline — The agent hand-rolled HMAC signature verification (parsing a… - #736

Draft
workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
eval-diagnosis/27fc772371c2d215de9905f716065fa56bc8091e08da5cbbc10e9021775340cf
Draft

workos-sdk-automation[bot] wants to merge 1 commit into
mainfrom
eval-diagnosis/27fc772371c2d215de9905f716065fa56bc8091e08da5cbbc10e9021775340cf

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Added a "Webhook Signature Verification" section to README.md documenting the SDK's
existing client.webhooks.verify_event() / verify_header() helpers, with a Django-style
example. The helpers were undocumented outside docstrings, so agents were hand-rolling the
HMAC check and getting the details subtly wrong; the section spells out the exact scheme —
WorkOS-Signature formatted t=<ms>, v1=<hex> with a , separator, HMAC-SHA256 over
"{timestamp}.{raw body}", raw bytes rather than a re-serialized dict, and the 180s default
tolerance. Docs-only change; no Python source touched. I could not run uv run pytest — the
command required an approval that was not granted in this session.

Finding

webhooks-django × codex-baseline · target sdk · confidence medium · seen in 1 sweep · still failing in the newest sweep

The agent hand-rolled HMAC signature verification (parsing a comma-separated 't=...,v1=...' header) instead of using the official WorkOS SDK/webhook-verification helper; if the grader's test vectors are generated via the real WorkOS SDK's signing scheme, a subtly different parsing/tolerance implementation would fail invalid_signature_rejected and webhook_delivery_e2e even though it passes self-authored tests.

Suggested change: Provide or document a reference WorkOS webhook-verification utility (e.g., via workos-python SDK) that agents can call, so the signing/verification algorithm matches what the eval's test fixtures expect.

Evidence

Checks

  • uv run pytest → passed

The workflow ran these after the agent finished; checks=passed in the marker above is their result.

Provenance

Opened from run https://evals.workos.tools/runs/01M3BD1BXZVYHG0F10DR65TQG7?tab=diagnosis by garen.torikian@workos.com, dispatched 2026-09-25T13:32:29.116Z · Actions run · branch eval-diagnosis/27fc772371c2d215de9905f716065fa56bc8091e08da5cbbc10e9021775340cf · fingerprint 27fc772371c2d215de9905f716065fa56bc8091e08da5cbbc10e9021775340cf

These findings are model-drafted hypotheses, not verdicts — verify the cited lines before merging. This PR was opened as a draft by the propose-fixes workflow in workos/evals; the agent that drafted the change edited only under the route's path prefix and did not push or open the PR itself.

…AC signature verification (parsing a…

The agent hand-rolled HMAC signature verification (parsing a comma-separated 't=...,v1=...' header) instead of using the official WorkOS SDK/webhook-verification helper; if the grader's test vectors are generated via the real WorkOS SDK's signing scheme, a subtly different parsing/tolerance implementation would fail invalid_signature_rejected and webhook_delivery_e2e even though it passes self-authored tests.

Evidence: https://evals.workos.tools/runs/01M3BD1BXZVYHG0F10DR65TQG7/attempts/01M3BD3FYTJ2V837E7G6RAGV6C?artifact=transcript&lines=20-26#L20
Finding: https://evals.workos.tools/runs/01M3BD1BXZVYHG0F10DR65TQG7?tab=diagnosis
Workflow: https://github.com/workos/evals/actions/runs/36141608655
@workos-sdk-automation workos-sdk-automation Bot added the eval-diagnosis Opened from a quickstudy diagnosis finding label Sep 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval-diagnosis Opened from a quickstudy diagnosis finding

Development

Successfully merging this pull request may close these issues.

0 participants