Commit Graph
9231 Commits
Author SHA1 Message Date
Michael Bolin 2f386ea455 merge commit for archive created by Sapling 2026-03-06 15:54:29 -08:00
Michael Bolin 0871411fdd linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:53:35 -08:00
Michael Bolin 7adedfaa6d protocol: keep root carveouts sandboxed 2026-03-06 15:52:52 -08:00
Michael Bolin 80a644e3ff sandboxing: preserve denied paths when widening permissions 2026-03-06 15:52:52 -08:00
Michael Bolin c5dc48ee66 linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:52:52 -08:00
Michael Bolin 3744e54506 seatbelt: honor split filesystem sandbox policies 2026-03-06 15:52:52 -08:00
Michael Bolin 25dfa21d78 safety: honor filesystem policy carveouts in apply_patch 2026-03-06 15:52:52 -08:00
Michael Bolin d06aaab795 protocol: derive effective file access from filesystem policies 2026-03-06 15:52:52 -08:00
Michael Bolin cb22ac9e7b sandboxing: plumb split sandbox policies through runtime 2026-03-06 15:52:52 -08:00
Michael Bolin 79cce374f8 merge commit for archive created by Sapling 2026-03-06 15:44:12 -08:00
Michael Bolin 4c2495be07 linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:43:59 -08:00
Michael Bolin f2a4ac9bb3 protocol: keep root carveouts sandboxed 2026-03-06 15:43:59 -08:00
Michael Bolin 19d42fc5cd sandboxing: preserve denied paths when widening permissions 2026-03-06 15:43:59 -08:00
Michael Bolin 79e535e304 linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:43:59 -08:00
Michael Bolin 6b8740e5eb seatbelt: honor split filesystem sandbox policies 2026-03-06 15:43:59 -08:00
Michael Bolin 4a4c7aac3a safety: honor filesystem policy carveouts in apply_patch 2026-03-06 15:43:59 -08:00
Michael Bolin 7380c3fc15 protocol: derive effective file access from filesystem policies 2026-03-06 15:43:59 -08:00
Michael Bolin c9f84a5526 sandboxing: plumb split sandbox policies through runtime 2026-03-06 15:43:58 -08:00
Michael Bolin f82678b2a4 config: add initial support for the new permission profile config language in config.toml (#13434)
## Why

`SandboxPolicy` currently mixes together three separate concerns:

- parsing layered config from `config.toml`
- representing filesystem sandbox state
- carrying basic network policy alongside filesystem choices

That makes the existing config awkward to extend and blocks the new TOML
proposal where `[permissions]` becomes a table of named permission
profiles selected by `default_permissions`. (The idea is that if
`default_permissions` is not specified, we assume the user is opting
into the "traditional" way to configure the sandbox.)

This PR adds the config-side plumbing for those profiles while still
projecting back to the legacy `SandboxPolicy` shape that the current
macOS and Linux sandbox backends consume.

It also tightens the filesystem profile model so scoped entries only
exist for `:project_roots`, and so nested keys must stay within a
project root instead of using `.` or `..` traversal.

This drops support for the short-lived `[permissions.network]` in
`config.toml` because now that would be interpreted as a profile named
`network` within `[permissions]`.

## What Changed

- added `PermissionsToml`, `PermissionProfileToml`,
`FilesystemPermissionsToml`, and `FilesystemPermissionToml` so config
can parse named profiles under `[permissions.<profile>.filesystem]`
- added top-level `default_permissions` selection, validation for
missing or unknown profiles, and compilation from a named profile into
split `FileSystemSandboxPolicy` and `NetworkSandboxPolicy` values
- taught config loading to choose between the legacy `sandbox_mode` path
and the profile-based path without breaking legacy users
- introduced `codex-protocol::permissions` for the split filesystem and
network sandbox types, and stored those alongside the legacy projected
`sandbox_policy` in runtime `Permissions`
- modeled `FileSystemSpecialPath` so only `ProjectRoots` can carry a
nested `subpath`, matching the intended config syntax instead of
allowing invalid states for other special paths
- restricted scoped filesystem maps to `:project_roots`, with validation
that nested entries are non-empty descendant paths and cannot use `.` or
`..` to escape the project root
- kept existing runtime consumers working by projecting
`FileSystemSandboxPolicy` back into `SandboxPolicy`, with an explicit
error for profiles that request writes outside the workspace root
- loaded proxy settings from top-level `[network]`
- regenerated `core/config.schema.json`

## Verification

- added config coverage for profile deserialization,
`default_permissions` selection, top-level `[network]` loading, network
enablement, rejection of writes outside the workspace root, rejection of
nested entries for non-`:project_roots` special paths, and rejection of
parent-directory traversal in `:project_roots` maps
- added protocol coverage for the legacy bridge rejecting non-workspace
writes

## Docs

- update the Codex config docs on developers.openai.com/codex to
document named `[permissions.<profile>]` entries, `default_permissions`,
scoped `:project_roots` syntax, the descendant-path restriction for
nested `:project_roots` entries, and top-level `[network]` proxy
configuration






---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/13434).
* #13453
* #13452
* #13451
* #13449
* #13448
* #13445
* #13440
* #13439
* __->__ #13434
2026-03-06 15:39:13 -08:00
Michael Bolin fd752f952b merge commit for archive created by Sapling 2026-03-06 15:33:39 -08:00
Michael Bolin e63b228459 linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:33:28 -08:00
Michael Bolin 7a229cc67b protocol: keep root carveouts sandboxed 2026-03-06 15:33:28 -08:00
Josh McKinneyandCodex 8ba718a611 docs: remove auth login logging plan (#13810)
## Summary

Remove `docs/auth-login-logging-plan.md`.

## Why

The document was a temporary planning artifact. The durable rationale
for the
auth-login diagnostics work now lives in the code comments, tests, PR
context,
and existing implementation notes, so keeping the standalone plan doc
adds
duplicate maintenance surface.

## Testing

- not run (docs-only deletion)

Co-authored-by: Codex <noreply@openai.com>
2026-03-06 23:32:53 +00:00
Michael Bolin 89441edb32 merge commit for archive created by Sapling 2026-03-06 15:27:35 -08:00
Michael Bolin 7d6d490ed4 sandboxing: preserve denied paths when widening permissions 2026-03-06 15:27:22 -08:00
Michael Bolin 88cb1ba8fb linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:27:22 -08:00
Michael Bolin 24f07714b5 linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:27:22 -08:00
Michael Bolin 1bd38597eb protocol: keep root carveouts sandboxed 2026-03-06 15:27:22 -08:00
Michael Bolin 7357ee9077 seatbelt: honor split filesystem sandbox policies 2026-03-06 15:27:22 -08:00
Michael Bolin 8d0d72c61a merge commit for archive created by Sapling 2026-03-06 15:22:32 -08:00
Michael Bolin f04febf58b safety: honor filesystem policy carveouts in apply_patch 2026-03-06 15:22:20 -08:00
Michael Bolin 3c052a333e linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:22:20 -08:00
Michael Bolin 99caae69b2 protocol: keep root carveouts sandboxed 2026-03-06 15:22:20 -08:00
Michael Bolin 8883fe0ff6 sandboxing: preserve denied paths when widening permissions 2026-03-06 15:22:20 -08:00
Michael Bolin 9b81b65552 linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:22:20 -08:00
Michael Bolin 42ff727f6f seatbelt: honor split filesystem sandbox policies 2026-03-06 15:22:20 -08:00
Michael Bolin 58ece05629 merge commit for archive created by Sapling 2026-03-06 15:20:28 -08:00
Michael Bolin 80859304d5 linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:20:10 -08:00
Michael Bolin f9db355578 protocol: keep root carveouts sandboxed 2026-03-06 15:20:10 -08:00
Curtis 'Fjord' Hawthorne d6c8186195 Clarify js_repl binding reuse guidance (#13803)
## Summary

Clarify the `js_repl` prompt guidance around persistent bindings and
redeclaration recovery.

This updates the generated `js_repl` instructions in
`core/src/project_doc.rs` to prefer this order when a name is already
bound:

1. Reuse the existing binding
2. Reassign a previously declared `let`
3. Pick a new descriptive name
4. Use `{ ... }` only for short-lived scratch scope
5. Reset the kernel only when a clean state is actually needed

The prompt now also explicitly warns against wrapping an entire cell in
block scope when the goal is to reuse names across later cells.

## Why

The previous wording still left too much room for low-value workarounds
like whole-cell block wrapping. In downstream browser rollouts, that
pattern was adding tokens and preventing useful state reuse across
`js_repl` cells.

This change makes the preferred behavior more explicit without changing
runtime semantics.

## Scope

- Prompt/documentation change only
- No runtime behavior changes
- Updates the matching string-backed `project_doc` tests
2026-03-06 15:19:06 -08:00
Michael Bolin 05e9b522f1 protocol: derive effective file access from filesystem policies 2026-03-06 15:19:04 -08:00
Michael Bolin 6fbab753cb sandboxing: preserve denied paths when widening permissions 2026-03-06 15:19:04 -08:00
Michael Bolin bddefc9edd linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:19:04 -08:00
Michael Bolin 7b5b968483 seatbelt: honor split filesystem sandbox policies 2026-03-06 15:19:04 -08:00
Michael Bolin 4b6d18c755 safety: honor filesystem policy carveouts in apply_patch 2026-03-06 15:19:04 -08:00
Michael Bolin 4544dd25b6 merge commit for archive created by Sapling 2026-03-06 15:17:38 -08:00
Michael Bolin 2dc364500b linux-sandbox: honor split filesystem policies in bwrap 2026-03-06 15:17:07 -08:00
Michael Bolin 099a061460 protocol: keep root carveouts sandboxed 2026-03-06 15:17:07 -08:00
Michael Bolin b483d481e9 sandboxing: preserve denied paths when widening permissions 2026-03-06 15:17:07 -08:00
Michael Bolin 85a06286ce linux-sandbox: plumb split sandbox policies through helper 2026-03-06 15:15:48 -08:00