Repository navigation
fix(crew): a confined worker cannot write the system git config - #2772
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
Follows #2720; closes the write side of #2609.
What
The read-only list now names the system git config: the file the core's
GIT_CONFIG_SYSTEMnames (already closed), else the path the core's Git was built with (git var GIT_CONFIG_SYSTEM, falling back to/etc/gitconfig; Homebrew'setc/gitconfigwhere that is the build path). On macOS the profile refuses a worker's write, create, rename or remove there; it stays readable.GIT_CONFIG_NOSYSTEM(#2720) stops reads only, so this is what refuses an explicitgit config --systemwrite.docs/crew/protocol/SPEC.mdupdated.Evidence
On the box (Linux):
host::confine::env_tests::the_system_git_config_is_on_the_read_only_listFAILED (list held only the home).cargo test -p orbyn-core confine::41 passed, 0 failed.cargo clippy -p orbyn-core --all-targets -- -D warnings: no errors.Not run:
host::confine::read_only_tests::the_system_config_git_was_built_with_is_closed_when_the_environment_names_none(a real sandboxedecho >andgit config --systemwrite to a fake path being refused).read_only_testsis macOS-only and the box is Linux, so it was not compiled or run; macOS CI or a macOS run must confirm it.AI usage
Tool: Claude Code 2.1.330. Model: claude-sonnet-5-5. Effort: medium. Human role: lead set the scope. Sources: none.
macOS run
output/cargo-serial.sh cargo test -p orbyn-core confine::on macOS (this Mac, head 2077a3c): 108 passed, 0 failed, 2 ignored, includingread_only_tests::the_system_config_git_was_built_with_is_closed_when_the_environment_names_none(a plain write andgit config --systemto the closed system config are both refused).Agent review: Eng 3 checked the diff at 2077a3c