Skip to content

feat(runtime): accept launcher TLS trust snapshots - #7943

Open
shellz-n-stuff wants to merge 1 commit into
codex/launcher-endpointsfrom
codex/launcher-tls
Open

shellz-n-stuff wants to merge 1 commit into
codex/launcher-endpointsfrom
codex/launcher-tls

Conversation

@shellz-n-stuff

@shellz-n-stuff shellz-n-stuff commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Allow an external launcher to supply a certificate snapshot for agent and CLI HTTPS requests. Without the environment setting, normal platform trust remains unchanged. Invalid snapshots fail closed and hostname checks remain enabled.

Stack 2/3: base codex/launcher-endpoints; next: credential broker.

Validation: synthetic TLS tests (trusted certificate, wrong hostname, missing snapshot) and 12 CLI regressions pass. Tests are included in this slice. No credential broker or plugin dependency.

Review / merge order: #7942 → #7943 → #7944. Related: #5286. Replaces #7940.

Required push checks passed for this branch. Hosted CI is tracked on the PR.

// Explicit Buzz-owned OAuth root for named demo builds. The agent may spawn
// auth-capable child tools after clearing its ambient environment.
"BUZZ_AGENT_CONFIG_DIR",
// Read-only launcher trust snapshot; do not forward the auth-broker capability.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So taking this path as an env var is the key security piece here. We could require/enforce a specific directory but I think that's explicitly easier to exploit than injecting an env var into what's running Buzz

@shellz-n-stuff
shellz-n-stuff marked this pull request as ready for review September 28, 2026 15:20
@shellz-n-stuff
shellz-n-stuff requested a review from a team as a code owner September 28, 2026 15:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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-09-28T15:25:57.449472Z b640a33 Draft marked ready
ℹ️ 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.

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

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

impl Llm {
pub fn new(cfg: &Config) -> Result<Self, AgentError> {
let http = Client::builder()
let http = crate::sandbox_runtime::http_builder()?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Apply the trust snapshot to the OAuth client

When BUZZ_SANDBOX_TLS_ROOTS contains the only CA trusted for a Databricks workspace and DATABRICKS_TOKEN is unset, the LLM client trusts the snapshot but build_token_source constructs PkceOAuthTokenSource with the unchanged Client::builder() in auth.rs. Its OIDC discovery, refresh, and token requests therefore reject the workspace certificate, preventing authentication and model discovery before any LLM request can run. Construct the PKCE HTTP client from the shared snapshot-aware builder as well.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
let bytes = std::fs::read(path).map_err(|_| fail())?;
if bytes.len() > 8 * 1024 * 1024 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bound the snapshot while reading it

If the launcher supplies a very large file or a non-terminating device such as /dev/zero, std::fs::read consumes the entire input before the 8 MiB check executes, so malformed input can exhaust memory or hang startup instead of failing closed. Read through a limit of 8 MiB plus one byte, then reject overflow before parsing.

AGENTS.md reference: AGENTS.md:L240-L248

Useful? React with 👍 / 👎.

Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant