Commit Graph
13172 Commits
Author SHA1 Message Date
Michael Bolin b5624c7b12 Merge 708e645016 into sapling-pr-archive-bolinfest 2026-04-25 17:22:32 -07:00
Michael Bolin 708e645016 permissions: finish profile-backed app surfaces 2026-04-25 17:22:24 -07:00
Michael Bolin 865f4e1793 Merge 1288e07a53 into sapling-pr-archive-bolinfest 2026-04-25 17:18:44 -07:00
Michael Bolin 6c4e4af990 permissions: remove core legacy policy round trips 2026-04-25 17:18:07 -07:00
Michael Bolin 1288e07a53 permissions: finish profile-backed app surfaces 2026-04-25 17:18:07 -07:00
Michael Bolin 487a4c7a18 permissions: migrate approval and sandbox consumers to profiles 2026-04-25 17:17:53 -07:00
Michael Bolin d622894209 permissions: derive compatibility policies from profiles 2026-04-25 17:17:53 -07:00
Michael Bolin 3f74417053 merge commit for archive created by Sapling 2026-04-25 17:12:16 -07:00
Michael Bolin 9581ad2e77 permissions: finish profile-backed app surfaces 2026-04-25 17:11:53 -07:00
Michael Bolin 4c7dffe996 permissions: remove core legacy policy round trips 2026-04-25 17:11:53 -07:00
Michael Bolin 8a7cad9194 permissions: migrate approval and sandbox consumers to profiles 2026-04-25 17:11:40 -07:00
Michael Bolin ee94b8a622 permissions: derive compatibility policies from profiles 2026-04-25 17:11:40 -07:00
Michael Bolin ce3b13a8dc merge commit for archive created by Sapling 2026-04-25 16:59:34 -07:00
Michael Bolin 02458defe8 permissions: finish profile-backed app surfaces 2026-04-25 16:59:22 -07:00
Michael Bolin 36e5c7eec7 merge commit for archive created by Sapling 2026-04-25 16:58:23 -07:00
Michael Bolin 346d2ace30 permissions: remove core legacy policy round trips 2026-04-25 16:57:57 -07:00
Michael Bolin 6e60521f91 permissions: finish profile-backed app surfaces 2026-04-25 16:57:57 -07:00
Michael Bolin 3eb3e77975 Merge 06a8b657e6 into sapling-pr-archive-bolinfest 2026-04-25 16:42:48 -07:00
Michael Bolin 5f1fed5e89 permissions: make runtime config profile-backed 2026-04-25 16:42:30 -07:00
Michael Bolin 5a078c1d6b permissions: migrate approval and sandbox consumers to profiles 2026-04-25 16:42:30 -07:00
Michael Bolin 06a8b657e6 permissions: finish profile-backed app surfaces 2026-04-25 16:42:30 -07:00
Michael Bolin be7a4f35fd permissions: derive compatibility policies from profiles 2026-04-25 16:42:30 -07:00
Michael Bolin 0f0afcda0a permissions: remove core legacy policy round trips 2026-04-25 16:42:30 -07:00
Michael Bolin 105ed20df2 Merge 6179326479 into sapling-pr-archive-bolinfest 2026-04-25 16:34:31 -07:00
Michael Bolin 6179326479 permissions: finish profile-backed app surfaces 2026-04-25 16:34:20 -07:00
Michael Bolin 33b45139a6 permissions: remove core legacy policy round trips 2026-04-25 16:34:20 -07:00
Michael Bolin b9d745f38b permissions: migrate approval and sandbox consumers to profiles 2026-04-25 16:34:20 -07:00
Michael Bolin d63182f063 permissions: derive compatibility policies from profiles 2026-04-25 16:34:20 -07:00
Michael Bolin 03fa011b2d permissions: make runtime config profile-backed 2026-04-25 16:34:20 -07:00
Michael Bolin 9881dc7306 fix: restore 30-minute timeout for Bazel builds (#19609)
I think raising it to 45 minutes in
https://github.com/openai/codex/pull/19578 was a mistake for the reasons
explained in the comments in the code. Instead, we attempt to defend
against timeouts by increasing the number of shards in
`app-server-all-test` so that a "true failure" that gets run 3x should
not take as much wall clock time.
2026-04-25 16:34:06 -07:00
Michael Bolin 4ae01d2932 merge commit for archive created by Sapling 2026-04-25 16:33:43 -07:00
Michael Bolin 4b6b014929 permissions: finish profile-backed app surfaces 2026-04-25 16:33:20 -07:00
Michael Bolin a64c320917 permissions: remove core legacy policy round trips 2026-04-25 16:33:20 -07:00
Michael Bolin c25276d17d permissions: migrate approval and sandbox consumers to profiles 2026-04-25 16:33:20 -07:00
Michael Bolin e1d91f59d8 permissions: derive compatibility policies from profiles 2026-04-25 16:33:20 -07:00
Michael Bolin cbb9bffa11 permissions: make runtime config profile-backed 2026-04-25 16:33:20 -07:00
Michael Bolin 5d4bed38a9 Merge ef2a1fe05e into sapling-pr-archive-bolinfest 2026-04-25 16:30:54 -07:00
Michael Bolin ef2a1fe05e permissions: finish profile-backed app surfaces 2026-04-25 16:30:34 -07:00
Michael Bolin 574332adf2 permissions: remove core legacy policy round trips 2026-04-25 16:30:34 -07:00
Michael Bolin d215a79455 permissions: migrate approval and sandbox consumers to profiles 2026-04-25 16:30:34 -07:00
Michael Bolin ee7b5bae10 permissions: derive compatibility policies from profiles 2026-04-25 16:30:34 -07:00
Michael Bolin 1448f60e6c permissions: make runtime config profile-backed 2026-04-25 16:30:34 -07:00
Michael Bolin d54493ba1c test: stabilize app-server path assertions on Windows (#19604)
## Why

Windows can represent the same canonical local path with either a normal
drive path or a verbatim device path prefix. The failure pattern that
motivated this PR was an assertion diff like `C:\...` versus
`\\?\C:\...`: different spellings, same file.

That became visible while validating the permissions stack above this
PR. The stack increasingly routes paths through `AbsolutePathBuf`, which
normalizes supported Windows device prefixes, while several existing
tests still built expected values directly with
`std::fs::canonicalize()` or compared `AbsolutePathBuf::as_path()` to a
raw `PathBuf`. On Windows, that can make tests fail because the two
sides choose different textual forms for an otherwise equivalent
canonical path.

This PR is intentionally split out as the bottom PR below #19606. The
runtime permissions migration should not carry unrelated Windows test
stabilization, and reviewers should be able to verify this as a
test-only change before looking at the larger permissions changes.

## Failure Modes Covered

- `conversation_summary` expected rollout paths were built from raw
canonicalized `PathBuf`s, while app-server responses could carry
`AbsolutePathBuf`-normalized paths.
- `thread_resume` compared returned thread paths directly to previously
stored or fixture paths, so a verbatim-prefix spelling could fail an
otherwise correct resume.
- `marketplace_add` compared plugin install roots through `as_path()`
against raw canonicalized paths, reproducing the same `C:\...` versus
`\\?\C:\...` mismatch in both app-server and core-plugin coverage.

## What Changed

- In `app-server/tests/suite/conversation_summary.rs`, normalize both
expected rollout paths and received `ConversationSummary.path` values
through `AbsolutePathBuf` before comparing the full summary object.
- In `app-server/tests/suite/v2/thread_resume.rs`, normalize both sides
of thread path comparisons before asserting equality. This keeps the
tests focused on whether resume returned the same existing path, not
whether Windows used the same string spelling.
- In `app-server/tests/suite/v2/marketplace_add.rs` and
`core-plugins/src/marketplace_add.rs`, compare install roots as
`AbsolutePathBuf` values instead of comparing an absolute-path wrapper
to a raw canonicalized `PathBuf`.

## Behavior

This PR does not change production app-server or marketplace behavior.
It only changes tests to assert semantic path identity across Windows
path spelling variants. It also leaves API response values untouched;
the normalization happens inside assertions only.

## Verification

Targeted local checks run while extracting this fix:

- `cargo test -p codex-app-server
get_conversation_summary_by_thread_id_reads_rollout`
- `cargo test -p codex-app-server
get_conversation_summary_by_relative_rollout_path_resolves_from_codex_home`
- `cargo test -p codex-app-server
thread_resume_prefers_path_over_thread_id`

Windows-specific confidence comes from the Bazel Windows CI job for this
PR, since the failure is platform-specific.

## Docs

No docs update is needed because this is test-only infrastructure
stabilization.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19604).
* #19395
* #19394
* #19393
* #19392
* #19606
* __->__ #19604
2026-04-25 16:25:28 -07:00
viyatb-oai 9aaa5d9358 [codex] Bypass managed network for escalated exec (#19595)
## Why

`sandbox_permissions = "require_escalated"` is treated as an explicit
request to approve the command and run it outside the
filesystem/platform sandbox. Before this change, shell and unified exec
still registered managed network approval context and could inject
Codex-managed proxy state into the child process, which meant an
approved escalated command could still hit a second network approval
path.

This PR makes that escalation boundary consistent: once a command is
explicitly approved to run outside the sandbox, Codex does not also
route that process through the managed network proxy.

## Security impact

Command/filesystem sandbox approval now implies network approval for
that command. If an untrusted command or script is allowed to run with
`require_escalated`, its network calls are unsandboxed: Codex-managed
network allowlists and denylists are not respected for that process, so
the command can exfiltrate any data it can read.

## What changed

- Skip managed network approval specs for
`SandboxPermissions::RequireEscalated`.
- Pass `network: None` into shell, zsh-fork shell, and unified exec
sandbox preparation for explicitly escalated requests.
- Strip Codex-managed proxy environment variables when
`CODEX_NETWORK_PROXY_ACTIVE` is present, while preserving user proxy env
when the Codex marker is absent.
- Add regression coverage for the prepared exec request so the old
behavior cannot silently reappear.

## Verification

- `cargo test -p codex-core explicit_escalation`
- `cargo clippy -p codex-core --all-targets -- -D warnings`
2026-04-25 23:23:58 +00:00
Michael Bolin 497dbf2640 Merge f00db2c8d2 into sapling-pr-archive-bolinfest 2026-04-25 16:17:41 -07:00
Michael Bolin f00db2c8d2 fix: restore 30-minute timeout for Bazel builds 2026-04-25 16:17:32 -07:00
Michael Bolin 03187b2c69 Merge 629a31c674 into sapling-pr-archive-bolinfest 2026-04-25 15:58:32 -07:00
Michael Bolin 629a31c674 permissions: finish profile-backed app surfaces 2026-04-25 15:57:32 -07:00
Michael Bolin 7d3bd8ffd8 permissions: remove core legacy policy round trips 2026-04-25 15:57:32 -07:00
Michael Bolin 70cd79acac permissions: migrate approval and sandbox consumers to profiles 2026-04-25 15:57:32 -07:00