Skip to content

fix(runtime): protect upload staging from workspace writers - #683

Merged
SaladDay merged 2 commits into
mainfrom
codex/files-private-staging
Sep 17, 2026
Merged

SaladDay merged 2 commits into
mainfrom
codex/files-private-staging

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

The workspace file installer staged input inside a directory writable by native tools, so a concurrent tool could replace the staged bytes or name before commit. Require a separate existing staging directory and keep both source and destination anchored to held descriptors. The operator protects staging with native filesystem policy; the helper rejects overlapping/symlink paths and cross-filesystem or cross-mount replacement without copying. Sync both directories after commit.

The private CLI now requires a fourth staging-directory argument. Documentation specifies a per-Environment parent visible as one writable mount to the installer, while ordinary tools can write only the workspace. Credentials/history stay outside that parent. This does not enable public Files.create or change default placement, Core, daemon, Claude, dependencies or protocol semantics.

Validation: locked executor tests, formatting, Clippy and release build passed; actual pinned Codex LinuxSeccomp process RPC passed binary/empty/overwrite/50 MiB uploads, hard-link preservation, path rejection, interrupted input and rejection of concurrent staging mutations. These are synthetic-byte mechanism checks with zero model calls, not public SDK/HTTP or real-model acceptance. Full server make check passed in517.73s on executable-identical389264cd; final b30208d adds only mount-layout documentation. Fresh independent full-diff review found no concrete in-scope issues and independently passed all7 installer and5 directory tests. It did not repeat native placement qualification or the full gate. Public admission must still verify placement and handle uncertain writes across failures. No API/query change requires OpenAPI/sqlc regeneration.

@SaladDay
SaladDay merged commit 1feba3a into main Sep 17, 2026
1 check passed
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