Skip to content

fix(security): redact invalid Azure authentication credentials - #2421

Open
HAYDEN-OAI wants to merge 30 commits into
mainfrom
codex/azure-credential-header-privacy-20260819-2019
Open

fix(security): redact invalid Azure authentication credentials#2421
HAYDEN-OAI wants to merge 30 commits into
mainfrom
codex/azure-credential-header-privacy-20260819-2019

Conversation

@HAYDEN-OAI

Copy link
Copy Markdown
Contributor

Summary

  • Validate resolved Azure static API keys and rotating Microsoft Entra bearer tokens before either credential is attached to an HTTP request.
  • Reject forbidden HTTP control characters, DEL, and non-byte Unicode using a fixed, cause-free TypeError that cannot expose a credential through error messages, stacks, or logging.
  • Preserve horizontal tabs, spaces, and valid HTTP obs-text; authentication opt-outs, provider errors, caller-header diagnostics, request redirects, and credential refresh behavior.
  • Keep the fix exclusively in handwritten Azure authentication code; generated core client files remain untouched.

Regression-first proof

The new real-public-client regression produced 214 failing / 17 passing cases before the production change; all 231 cases pass afterward. It covers static and rotating credentials across generic requests, model listings, and chat completions, all forbidden C0 bytes, DEL, CRLF, astral Unicode, unpaired surrogates, default/custom logging, absent causes, and zero outbound requests.

Verification

  • 348 focused Azure tests passing.
  • 4,074 handwritten tests across 123 files passing.
  • 559 generated tests across 82 files passing against an isolated random-port mock.
  • Repository formatting/lint, strict TypeScript, and full CommonJS/ESM package build.
  • Published-source TypeScript 4.9 and current TypeScript; publint only reports its pre-existing vendor warning.
  • Packed-package Node 22 smoke checks, including 136 rejected malformed credentials and 16 valid compatibility cases across CommonJS/ESM and both Azure authentication modes.

@HAYDEN-OAI
HAYDEN-OAI requested a review from a team as a code owner August 19, 2026 20:32
@openai-sdks

openai-sdks Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 9.062s for Node SDK PR #2421.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 186ms
tests/chat-completions-create.test.ts ✅ Passed 159ms
tests/chat-completions-stream.test.ts ✅ Passed 152ms
tests/files-content-binary.test.ts ✅ Passed 119ms
tests/files-create-multipart.test.ts ✅ Passed 229ms
tests/files-list-pagination.test.ts ✅ Passed 130ms
tests/initialize-config.test.ts ✅ Passed 128ms
tests/instance-isolation.test.ts ✅ Passed 80ms
tests/models-list.test.ts ✅ Passed 119ms
tests/responses-background-lifecycle.test.ts ✅ Passed 199ms
tests/responses-body-method-errors.test.ts ✅ Passed 258ms
tests/responses-cancel-timeout.test.ts ✅ Passed 189ms
tests/responses-cancel.test.ts ✅ Passed 149ms
tests/responses-compact-retries.test.ts ✅ Passed 181ms
tests/responses-compact.test.ts ✅ Passed 186ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 129ms
tests/responses-create-advanced.test.ts ✅ Passed 154ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.101s
tests/responses-create-errors.test.ts ✅ Passed 154ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 141ms
tests/responses-create-retries.test.ts ✅ Passed 197ms
tests/responses-create-stream-failures.test.ts ✅ Passed 149ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.152s
tests/responses-create-stream-wire.test.ts ✅ Passed 2.115s
tests/responses-create-stream.test.ts ✅ Passed 67ms
tests/responses-create-terminal-states.test.ts ✅ Passed 223ms
tests/responses-create-timeout.test.ts ✅ Passed 204ms
tests/responses-create.test.ts ✅ Passed 120ms
tests/responses-delete.test.ts ✅ Passed 100ms
tests/responses-input-items-errors.test.ts ✅ Passed 135ms
tests/responses-input-items-list.test.ts ✅ Passed 152ms
tests/responses-input-items-options.test.ts ✅ Passed 93ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 221ms
tests/responses-input-tokens-count.test.ts ✅ Passed 174ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.722s
tests/responses-not-found-errors.test.ts ✅ Passed 205ms
tests/responses-parse.test.ts ✅ Passed 140ms
tests/responses-retrieve-retries.test.ts ✅ Passed 251ms
tests/responses-retrieve.test.ts ✅ Passed 237ms
tests/responses-stored-method-errors.test.ts ✅ Passed 509ms
tests/retry-behavior.test.ts ✅ Passed 3.034s
tests/sdk-error-shape.test.ts ✅ Passed 226ms

View OkTest run #32906152275

SDK merge (2041bd310d60) · head (93c4ee33c9e6) · base (a90581ed85f2) · OkTest (2b1bdfd25e98)

@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: 5e2b22a09c

ℹ️ 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 src/azure.ts Outdated
Comment thread src/azure.ts Outdated

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

Independent two-pass security review confirms both existing unresolved exact-head P1 discussions; no duplicate inline comments are needed. Stable and beta Azure Realtime WebSocket factories bypass the new validator, and native WebSocket errors disclose malformed API-key or Entra bearer credentials. Supported request/default authentication-header overrides also bypass configured-key validation and disclose their effective secret; conversely invalid unused configured keys are rejected despite valid overrides. Validate the effective credential at the actual HTTP and WebSocket header-construction boundaries while preserving override precedence.

Comment thread tests/lib/azure-deployment-path-safety.test.ts Fixed

@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: 222e643aa2

ℹ️ 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 src/internal/headers.ts Outdated
Comment thread src/azure.ts Outdated
Comment thread src/internal/headers.ts Outdated
Comment thread src/azure.ts 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: 7ff52b636c

ℹ️ 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 src/azure.ts Outdated
Comment thread src/internal/headers.ts
Comment thread src/azure.ts 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: eba9440c14

ℹ️ 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 src/internal/headers.ts 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: 953b385759

ℹ️ 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 src/internal/headers.ts
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

32 mixed files remain; 0 existing customizations changed.

Compared a90581ed85f293c4ee33c9e6. Generated baselines verified.

32 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts
  • src/resources/vector-stores/files.ts
  • src/resources/webhooks/index.ts
  • src/resources/webhooks/webhooks.ts
  • tests/lib/data-residency.test.ts

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 32906184740 --repo openai/openai-node \
  --name castiron-custom-code-32906184740-1 --dir /tmp/castiron-custom-code-32906184740-1
git apply --stat /tmp/castiron-custom-code-32906184740-1/custom-code.patch
cat /tmp/castiron-custom-code-32906184740-1/custom-code.patch

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

git fetch --no-tags origin a90581ed85f236a2440102fe64320f1831844b50 93c4ee33c9e61b45c42d29619cea3be13d66c6e2
python3 scripts/castiron/custom_code_report.py report \
  --base a90581ed85f236a2440102fe64320f1831844b50 \
  --head 93c4ee33c9e61b45c42d29619cea3be13d66c6e2 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-93c4ee33c9e6
cat /tmp/castiron-custom-code-93c4ee33c9e6/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: c006e3bcfe

ℹ️ 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 src/internal/headers.ts Outdated

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

Independent two-pass review confirms Azure credential-redaction fixes, but a newly introduced iterator typing regression deterministically breaks both ecosystem CI and the breaking-change detector with TS2352.

Comment thread src/internal/headers.ts 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: 63f427f025

ℹ️ 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 src/internal/azure.ts Outdated
Comment thread src/internal/headers.ts 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: 8ea03dc2d2

ℹ️ 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 src/internal/headers.ts Outdated
Comment thread src/internal/headers.ts
Comment thread src/internal/headers.ts 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: 1cecd41ce0

ℹ️ 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 src/azure.ts Outdated
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 20, 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 Completed 2026-08-25T22:30:59.124671Z 93c4ee3 New commits
🔒 Security Review Completed 2026-08-25T22:29:46.961206Z 93c4ee3 New commits
ℹ️ 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.

Comment thread tests/log.test.ts Fixed
Comment thread tests/log.test.ts Fixed

@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: 58e88e89c5

ℹ️ 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 src/azure.ts Outdated

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

Requesting changes for the existing P2 discussion at src/azure.ts:461. snapshotCrossRealmHeaders checks Symbol.toStringTag only on the immediate prototype, so a valid subclass of cross-realm Headers is returned unchanged and subsequently parsed as an empty record, silently dropping Azure authentication and hook-provided headers. Walk the foreign prototype chain safely while preserving the existing descriptor/iterator integrity checks, and add a cross-realm Headers-subclass regression. The existing inline discussion already records this issue.

@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: 57042322d6

ℹ️ 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 src/azure.ts
Comment thread src/internal/headers.ts Outdated
Comment thread src/azure.ts 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: 1695ca753a

ℹ️ 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 src/azure.ts 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: 99d8e77203

ℹ️ 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 src/internal/headers.ts
Comment thread src/azure.ts Outdated
Comment thread src/azure.ts
Comment thread src/azure.ts Outdated
Comment thread src/internal/headers.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

openai-node/src/azure.ts

Lines 338 to 340 in c5299da

if (!descriptor.configurable) {
throw new TypeError('Azure OpenAI credential contains an invalid HTTP header value.');
}

P2 Badge Support non-configurable request header accessors

When a direct client.request() options object exposes headers through a non-configurable getter, this branch rejects the request before super.buildRequest() even if the getter returns entirely valid headers. The base implementation could read such an accessor without redefining it, so ordinary Azure requests now fail solely because of the property's descriptor; snapshot or consume it without requiring configurability.

AGENTS.md reference: AGENTS.md:L52-L57


protectsAzureCredentials &&
requestRegistration !== undefined &&
matchesAzureRequestHeaders(source, requestRegistration)
? requestRegistration.carrier
: source;

P2 Badge Preserve non-auth header mutations after body preprocessing

When a body-bearing request's protected authHeaders or bearerAuth override mutates a non-authentication entry in options.headers while resolving credentials, the preliminary body pass has already snapshotted the entire raw header record into requestRegistration.carrier; this substitution then replays that cached record during the final merge, silently discarding changes such as a newly assigned x-tenant value. The base final merge reread options.headers, so cache only the security-critical authentication representation while preserving current non-auth headers.

AGENTS.md reference: AGENTS.md:L106-L110

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

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

? requestRegistration.carrier

P2 Badge Honor in-place request-header mutations from auth hooks

When a protected authHeaders override mutates options.headers in place during a body-bearing request, the preliminary body pass has already frozen registration.carrier; because the source object still matches by identity, this substitution discards the hook's mutation during the final merge. For example, changing an existing api-key from a tenant-A token to a tenant-B token inside the hook still dispatches tenant A's token, whereas the base implementation's final merge observed the mutation. Preserve or resnapshot the live post-hook headers before the final merge.

AGENTS.md reference: AGENTS.md:L106-L110

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

@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: 476508d660

ℹ️ 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 src/internal/azure.ts Outdated
Comment thread src/azure.ts Outdated
Comment thread src/azure.ts

@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: 21112059e7

ℹ️ 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 src/azure.ts Outdated
Comment thread src/azure.ts 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: 94bfb1c22b

ℹ️ 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 src/azure.ts
Comment thread src/internal/headers.ts 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: c611eadc5a

ℹ️ 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 src/azure.ts Outdated
Comment thread src/azure.ts
Comment thread src/azure.ts

@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: cf44e55767

ℹ️ 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 src/azure.ts Outdated
Comment thread src/internal/headers.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

originalSetter.call(this, value);

P1 Badge Sanitize exceptions from request-header setters

When a protected authentication hook assigns options.headers and the caller-defined accessor setter throws an error containing an API key or bearer token, this call propagates that error unchanged. The surrounding request rejection handler does not sanitize it because the temporary getter was already consumed during the inherited shallow copy, so the credential can escape in the thrown error; catch setter failures and replace them with the constant cause-free credential diagnostic, as is already done for the subsequent getter.

AGENTS.md reference: AGENTS.md:L98-L105


(visibleNames.has(normalized) && mutation?.kind !== 'append')

P2 Badge Preserve intrinsic deletions of deferred credentials

When a protected authentication override calls Headers.prototype.delete.call(carrier.values, 'api-key'), the configured key still exists only in the lazy layer while the native Headers backing is empty, so the intrinsic deletion creates no mutation record and this condition re-emits the original credential because it is absent from visibleNames. The request therefore still sends a key that the same operation removed from the populated native Headers exposed by the base revision. Fresh evidence after the earlier intrinsic/live-iterator fix is that deleting an inherited deferred credential, rather than a field first inserted into the native backing, remains ineffective.

AGENTS.md reference: AGENTS.md:L106-L110

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants