Skip to content

docs: add canonical SDK security model - #3778

Merged
jbeckwith-oai merged 6 commits into
mainfrom
codex/canonical-security-model
Sep 2, 2026
Merged

docs: add canonical SDK security model#3778
jbeckwith-oai merged 6 commits into
mainfrom
codex/canonical-security-model

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

  • add docs/architecture/security-model.md as the canonical Codex Security threat model
  • keep SECURITY.md focused on coordinated disclosure and point it to the canonical model
  • clarify repository-code authority while preserving runtime parser, webhook, metadata, and CI/release boundaries

Validation

  • verified 98 source citations resolve to existing files and valid lines
  • resolved SECURITY.md policy chain for docs/architecture/security-model.md
  • git diff --check
  • ./scripts/lint (blocked before linting by the preexisting base-state uv.lock needing update under --locked)

@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner September 1, 2026 21:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-09-02T03:29:29.349473Z f3f0f57 New commits
🔒 Security Review Completed 2026-09-02T03:30:23.563787Z f3f0f57 New commits

Security findings

Blocking findings (1)

ℹ️ 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.

@openai-sdks

openai-sdks Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 13.752s for Python SDK PR #3778.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 261ms
tests/chat-completions-create.test.ts ✅ Passed 459ms
tests/chat-completions-stream.test.ts ✅ Passed 224ms
tests/files-content-binary.test.ts ✅ Passed 171ms
tests/files-create-multipart.test.ts ✅ Passed 241ms
tests/files-list-pagination.test.ts ✅ Passed 190ms
tests/initialize-config.test.ts ✅ Passed 266ms
tests/instance-isolation.test.ts ✅ Passed 190ms
tests/models-list.test.ts ✅ Passed 381ms
tests/responses-background-lifecycle.test.ts ✅ Passed 272ms
tests/responses-body-method-errors.test.ts ✅ Passed 465ms
tests/responses-cancel-timeout.test.ts ✅ Passed 211ms
tests/responses-cancel.test.ts ✅ Passed 306ms
tests/responses-compact-retries.test.ts ✅ Passed 437ms
tests/responses-compact.test.ts ✅ Passed 256ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 388ms
tests/responses-create-advanced.test.ts ✅ Passed 304ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.508s
tests/responses-create-errors.test.ts ✅ Passed 221ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 459ms
tests/responses-create-retries.test.ts ✅ Passed 385ms
tests/responses-create-stream-failures.test.ts ✅ Passed 210ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 302ms
tests/responses-create-stream-wire.test.ts ✅ Passed 4.18s
tests/responses-create-stream.test.ts ✅ Passed 74ms
tests/responses-create-terminal-states.test.ts ✅ Passed 401ms
tests/responses-create-timeout.test.ts ✅ Passed 211ms
tests/responses-create.test.ts ✅ Passed 465ms
tests/responses-delete.test.ts ✅ Passed 277ms
tests/responses-input-items-errors.test.ts ✅ Passed 681ms
tests/responses-input-items-list.test.ts ✅ Passed 490ms
tests/responses-input-items-options.test.ts ✅ Passed 436ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 339ms
tests/responses-input-tokens-count.test.ts ✅ Passed 325ms
tests/responses-malformed-inputs.test.ts ✅ Passed 3.073s
tests/responses-not-found-errors.test.ts ✅ Passed 365ms
tests/responses-parse.test.ts ✅ Passed 463ms
tests/responses-retrieve-retries.test.ts ✅ Passed 353ms
tests/responses-retrieve.test.ts ✅ Passed 344ms
tests/responses-stored-method-errors.test.ts ✅ Passed 870ms
tests/retry-behavior.test.ts ✅ Passed 3.232s
tests/sdk-error-shape.test.ts ✅ Passed 293ms

View OkTest run #33586955392

SDK merge (f36a8f264df2) · head (f3f0f57411fe) · base (ab76ab5c64b8) · OkTest (2b1bdfd25e98)

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

34 mixed files remain; 0 existing customizations changed.

Compared ab76ab5c64b8f3f0f57411fe. Generated baselines verified.

34 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/beta/responses/responses.py
  • src/openai/resources/beta/threads/runs/runs.py
  • src/openai/resources/beta/threads/threads.py
  • src/openai/resources/chat/completions/completions.py
  • src/openai/resources/embeddings.py
  • src/openai/resources/files.py
  • src/openai/resources/realtime/realtime.py
  • src/openai/resources/responses/responses.py
  • src/openai/resources/uploads/uploads.py
  • src/openai/resources/vector_stores/file_batches.py
  • src/openai/resources/vector_stores/files.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.py
  • src/openai/types/chat/init.py
  • src/openai/types/chat/chat_completion_message_tool_call.py
  • src/openai/types/fine_tuning/fine_tuning_job_integration.py
  • src/openai/types/responses/init.py
  • src/openai/types/responses/response.py
  • src/openai/types/responses/response_function_web_search.py
  • src/openai/types/responses/response_function_web_search_param.py
  • src/openai/types/responses/tool.py
  • src/openai/types/responses/tool_param.py
  • src/openai/types/webhooks/init.py
  • tests/api_resources/test_videos.py

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 33586977504 --repo openai/openai-python \
  --name castiron-custom-code-33586977504-1 --dir /tmp/castiron-custom-code-33586977504-1
git apply --stat /tmp/castiron-custom-code-33586977504-1/custom-code.patch
cat /tmp/castiron-custom-code-33586977504-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin ab76ab5c64b8d19761ce838891acc80743cd944a f3f0f57411feea8880a807a2bdb936a5f3910e15
python3 scripts/castiron/custom_code_report.py report \
  --base ab76ab5c64b8d19761ce838891acc80743cd944a \
  --head f3f0f57411feea8880a807a2bdb936a5f3910e15 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-f3f0f57411fe
cat /tmp/castiron-custom-code-f3f0f57411fe/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c17b867e1a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated

@HAYDEN-OAI HAYDEN-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.

Reviewed c17b867e1a. The three existing security-model threads remain actionable: CodeQL's requested write capability, sensitive diagnostic recipients, and the scheduled assessment / issue-publisher boundary. I independently checked them against the existing policy and source contracts; please reconcile these boundaries before making the model authoritative. I would treat them as P2 documentation/policy corrections, not evidence of a newly demonstrated runtime exploit. Added a source-backed clarification in the existing diagnostic thread; no additional distinct findings.

Static review of both changed files and their relevant runtime/authentication, diagnostic, and workflow permission contracts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85d7736d76

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c181602852

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: c181602852

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread SECURITY.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4e0a0a58b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 170cf59e14

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 170cf59e14

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
Comment thread docs/architecture/security-model.md Outdated
@jbeckwith-oai
jbeckwith-oai force-pushed the codex/canonical-security-model branch from 170cf59 to f3f0f57 Compare September 2, 2026 03:25
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HAYDEN-OAI HAYDEN-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.

Re-reviewed f3f0f57411fe. The previous CodeQL token, diagnostic-recipient, and monthly assessment/publisher findings are now addressed and consistent with the existing policy and source contracts. No further substantive findings from the complete documentation/policy diff and its relevant runtime, authentication, diagnostic, and workflow boundaries. Static source review only; tests and CI were not run or assessed.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 2a097b9 Sep 2, 2026
26 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/canonical-security-model branch September 2, 2026 22:34
@openai-sdks openai-sdks Bot mentioned this pull request Sep 2, 2026
apcha-oai pushed a commit that referenced this pull request Sep 3, 2026
Automated Release PR
---


##
[3.8.0](v3.7.0...v3.8.0)
(2026-09-03)


### Features

* **api:** add gpt-6-astra and related features
([#3791](#3791))
([09f446f](09f446f))


### Documentation

* add canonical SDK security model
([#3778](#3778))
([2a097b9](2a097b9))

---
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.

2 participants