Skip to content

feat(network-proxy): experimental local credential broker - #28034

Merged
viyatb-oai merged 6 commits into
mainfrom
dev/winston/local-credential-broker
Jun 24, 2026
Merged

feat(network-proxy): experimental local credential broker#28034
viyatb-oai merged 6 commits into
mainfrom
dev/winston/local-credential-broker

Conversation

@winston-openai

@winston-openai winston-openai commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Why

Codex child processes can inherit injectable local credentials directly, which lets commands read and exfiltrate the real values. This experimental slice keeps supported workflows working while moving those credentials behind the managed network proxy.

This PR contains only the proxy-owned broker implementation. The Codex config and runtime integration is stacked separately in #29752.

What changed

  • discover supported credentials during child setup, retain real values only in the in-memory proxy broker, and replace them with shaped dummy values
  • require a presented dummy to select a stored credential and preserve unrelated explicit authorization headers
  • bind GitHub cloud, GitHub Enterprise, and OpenAI credentials to their intended hosts
  • inject credentials only into TLS traffic by default; plaintext injection requires the explicit dangerous opt-in
  • use TLS ClientHello routing for CONNECT so non-TLS protocols remain opaque tunnels
  • expose a pure API that identifies environment keys still holding broker-generated dummies without mutating the caller's environment

Scope

  • supported credentials: GH_TOKEN, GITHUB_TOKEN, GH_ENTERPRISE_TOKEN, GITHUB_ENTERPRISE_TOKEN, and OPENAI_API_KEY
  • GitHub cloud credentials match github.com, api.github.com, and *.ghe.com
  • GitHub Enterprise credentials match only the normalized non-cloud GH_HOST
  • OpenAI API keys match only api.openai.com
  • this does not cover SSH agents, kube client certificates, filesystem secret discovery, or context-injected secret scrubbing

Validation

  • just test -p codex-network-proxy (191 passed)
  • focused opaque CONNECT, plaintext opt-in, dummy-selection, and child-isolation regressions passed
  • scoped Clippy check for codex-network-proxy passed

@winston-openai
winston-openai force-pushed the dev/winston/local-credential-broker branch 6 times, most recently from 5446ca3 to 006a77a Compare June 13, 2026 08:36
@winston-openai
winston-openai marked this pull request as ready for review June 16, 2026 01:51
@winston-openai
winston-openai requested a review from a team as a code owner June 16, 2026 01:51

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 006a77a3d6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/network-proxy/src/credential_broker.rs Outdated
Comment thread codex-rs/network-proxy/src/credential_broker.rs Outdated
Comment thread codex-rs/network-proxy/src/credential_broker.rs Outdated
Comment thread codex-rs/network-proxy/src/credential_broker.rs Outdated
Comment thread codex-rs/network-proxy/src/credential_broker.rs Outdated
Comment thread codex-rs/network-proxy/src/proxy.rs Outdated
@winston-openai winston-openai changed the title Add local credential broker Add experimental local credential broker Jun 17, 2026
winston-openai added a commit that referenced this pull request Jun 17, 2026
@winston-openai
winston-openai force-pushed the dev/winston/local-credential-broker branch from f992518 to 732cf55 Compare June 17, 2026 18:45
@winston-openai
winston-openai changed the base branch from dev/winston/mitm-command-ca-bundles to main June 17, 2026 18:46
@winston-openai
winston-openai force-pushed the dev/winston/local-credential-broker branch 2 times, most recently from 807dfe6 to f52cce3 Compare June 17, 2026 20:03
@winston-openai
winston-openai force-pushed the dev/winston/local-credential-broker branch 3 times, most recently from 99eeb43 to 9204084 Compare June 18, 2026 18:44
@viyatb-oai viyatb-oai changed the title Add experimental local credential broker feat(network-proxy): experimental local credential broker Jun 23, 2026
@viyatb-oai
viyatb-oai force-pushed the dev/winston/local-credential-broker branch from b357b3c to bf99b76 Compare June 23, 2026 21:55
@viyatb-oai
viyatb-oai force-pushed the dev/winston/local-credential-broker branch 2 times, most recently from 5c12c9b to 09bd01e Compare June 24, 2026 00:13
@viyatb-oai
viyatb-oai removed the request for review from a team June 24, 2026 00:17
winston-openai and others added 2 commits June 23, 2026 18:48
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai
viyatb-oai force-pushed the dev/winston/local-credential-broker branch from 09bd01e to d1613d0 Compare June 24, 2026 01:57
@viyatb-oai
viyatb-oai merged commit 989f55d into main Jun 24, 2026
31 checks passed
@viyatb-oai
viyatb-oai deleted the dev/winston/local-credential-broker branch June 24, 2026 20:21
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants