Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Bug: Codex seats can write hive/bin (no way to make it read-only); suggest a named Codex permission profile

Abierto
#784 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend, security

Línea de trabajo

Start at the Codex seat spawn options (autoModeFlag/autoFlag) and codexWritableRootsToml, then trace how per-seat .codex/config.toml is generated. Check both regular and temp/worker seats. Done means Codex seats can write to the configured hive paths while hive/bin stays read-only, with the named permission profile selected without -s.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Version: Munder Difflin 0.5.7 (macOS, Apple Silicon), Codex CLI 0.163.0

What happens

Codex agents (seats) can write to everything under <harnessHome>/hive/, including hive/bin/. Files in hive/bin/ (e.g. hive-node, the hook scripts) are executed by things that run outside the agent sandbox (hooks, background services). So any Codex seat can replace an executable that later runs unsandboxed.

Claude Code seats can be fenced off with sandbox.filesystem.denyWrite (plus an Edit(...) deny rule). There is no equivalent for Codex seats, because the generated config only uses the legacy sandbox.

Evidence
  • The generated per-seat <agent>/.codex/config.toml has [sandbox_workspace_write].writable_roots including the project, the agent folder, the entire hive, and the palace. No named permission profile.
  • Seats are spawned with -a never -s workspace-write (autoModeFlag/autoFlag), and codexWritableRootsToml only emits legacy writable_roots.
  • Retest from a Codex seat (2026-10-24): open(O_CREAT|O_EXCL) on hive/bin/.probe succeeded, then unlinked. Write allowed.
Expected

A way to keep hive/bin (and other app-owned executable paths) read-only for Codex seats while the rest of the hive stays writable.

Suggested fix (supported by Codex 0.163.0)

Emit a named permission profile instead of the legacy sandbox, and select it without -s:

approval_policy = "never"
default_permissions = "hive_guarded"

[permissions.hive_guarded]
extends = ":workspace"

[permissions.hive_guarded.filesystem]
"<project>" = "write"
"<harnessHome>/hive" = "write"
"<harnessHome>/hive/bin" = "read"
"<harnessHome>/palace" = "write"

Drop sandbox_mode / [sandbox_workspace_write] for that mode (they should not be mixed with a named profile), keep -a never, and omit -s workspace-write. References: Codex config schema and permissions compiler at rust-v0.163.0 (codex-rs/core/config.schema.json, codex-rs/core/src/config/permissions.rs), and https://developers.openai.com/codex/config-reference/.

Ideally the read-only list is configurable (some users protect more app-owned paths), and temp/worker Codex seats get the same profile.

Workaround we use for now

A file-hash watcher on hive/bin that alerts on any change. Detection only, not prevention.

Related: #687, #688 (other requests about the generated seat sandbox settings).

Lenguaje dominante
TypeScript
Estrellas
8.5k
Forks
1.2k
Merge medio
12 h 44 min
PR fusionados (30 d)
65

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de HarnessMD/munder-difflin

Todos los issues de HarnessMD/munder-difflin

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.