Skip to content

fix: reject empty webhook signing keys - #4321

Merged
marcuswood-oai merged 1 commit into
mainfrom
codex/reject-empty-webhook-key
Nov 24, 2026
Merged

marcuswood-oai merged 1 commit into
mainfrom
codex/reject-empty-webhook-key

Conversation

@marcuswood-oai

Copy link
Copy Markdown
Contributor

Changes being requested

Raise ValueError when a webhook secret is empty after decoding, consistent with a missing secret. Valid raw and prefixed secrets keep their existing behavior.

Additional context & links

Updated the sync and async signature tests to expect a configuration error for empty keys. All 232 webhook tests passed. Also checked unwrap() with an empty environment variable on both clients. Ruff and ty passed for the changed files.

@marcuswood-oai
marcuswood-oai requested a review from a team as a code owner November 23, 2026 21:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-11-23T21:33:21.905793Z de9ff36 PR opened
🔒 Security Review ✅ Completed 2026-11-23T21:34:00.948314Z de9ff36 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.

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared verifier now rejects empty decoded keys for both clients. The sync and async tests cover empty raw and prefixed secrets, and they preserve the caller’s explicit secret over the client default. Valid raw and prefixed keys still take the existing path.

Static review only. Hosted checks were still running.

@jbeckwith-oai jbeckwith-oai left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after full static and independent review. Empty raw secrets and prefixed secrets that decode to an empty key are rejected before HMAC verification, including explicit empty overrides when a valid client secret exists. Both sync and async resources share the guard, and unwrap verifies before parsing. Valid raw/prefixed keys, replay-window checks, constant-time comparison, and existing malformed-input behavior are preserved.

Hosted CI: 15 checks passed, nine skipped, and Python 3.10/3.14 test jobs remain running; OkTest passed. No candidate code or local tests executed.

Hosted CI update (2026-11-23 21:41 UTC): All 17 executed checks passed; nine checks were skipped. No local tests were run.

@marcuswood-oai
marcuswood-oai added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit dd69803 Nov 24, 2026
26 checks passed
@marcuswood-oai
marcuswood-oai deleted the codex/reject-empty-webhook-key branch November 24, 2026 00:00
@openai-sdks openai-sdks Bot mentioned this pull request Nov 23, 2026
gh-actions-shared Bot pushed a commit to xf-qubit/openai-python that referenced this pull request Nov 24, 2026
Automated Release PR
---


##
[3.59.0](openai/openai-python@v3.58.0...v3.59.0)
(2026-11-24)


### Features

* **api:** add healthcare model IDs for Responses
([openai#4327](openai#4327))
([804a9af](openai@804a9af))


### Bug Fixes

* check the agent upload directory after path resolution
([openai#4323](openai#4323))
([bc02da4](openai@bc02da4))
* redact credential headers on API error requests
([openai#4316](openai#4316))
([9d7f58e](openai@9d7f58e))
* reject empty webhook signing keys
([openai#4321](openai#4321))
([dd69803](openai@dd69803))
* reject non-finite numbers in agent tool arguments
([openai#4326](openai#4326))
([abbd379](openai@abbd379))
* use bearer authentication for beta Realtime sessions
([openai#4317](openai#4317))
([7596fb8](openai@7596fb8))


### Documentation

* explain how to skip duplicate webhook events
([openai#4325](openai#4325))
([6805f05](openai@6805f05))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
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.

4 participants