T5-P6-A11-WP1 Document Codex git_metadata_writable Sandbox Verification#4121
Merged
Trecek merged 2 commits intoJun 27, 2026
Merged
Conversation
The Codex workspace-write sandbox mounts .git/ read-only across all platforms. Codex CLI source (codex-rs/protocol/src/permissions.rs) hardcodes .git in PROTECTED_METADATA_PATH_NAMES, and default_read_only_subpaths_for_writable_root() enforces this via Seatbelt on macOS and bwrap/landlock on Linux. Add a multi-line comment above git_metadata_writable=False in CodexBackend.capabilities documenting: - The behavioral finding (.git/ is read-only) - The evidence basis (permissions.rs, PROTECTED_METADATA_PATH_NAMES) - The enforcement mechanism (Seatbelt, bwrap/landlock) - The consumer path (_auto_overrides.py, fleet/_api.py, rules_backend_compat.py) and gating behavior Add two regression tests: - test_git_metadata_writable asserts the capability field value - test_no_git_subdir_created asserts setup_session_dir does not create a .git/ subdirectory Refs: #3876
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a documented, evidence-backed code comment above
git_metadata_writable=FalseinCodexBackend.capabilitiesconfirming that the Codexworkspace-writesandbox protects.git/from writes. This is Path A — the existing value is correct. The Codex CLI source code (codex-rs/protocol/src/permissions.rs) hardcodes.gitinPROTECTED_METADATA_PATH_NAMES, and thedefault_read_only_subpaths_for_writable_root()function enforces read-only access for.git/on all platforms (Seatbelt on macOS, bwrap/landlock on Linux). Add two tests: one asserting the capability field value, one assertingsetup_session_dirdoes not create a.gitsubdirectory.Implementation Plan
Plan file:
/home/talon/projects/autoskillit-runs/impl-20260627-010559-672793/.autoskillit/temp/make-plan/t5_p6_a11_wp1_codex_git_metadata_writable_plan_2026-06-27_013500.mdCloses #4047
🤖 Generated with Claude Code via AutoSkillit
Token Usage Summary
* Step used a non-Anthropic provider; caching behavior may differ.
Token Efficiency
Model Usage Breakdown