Repository navigation
test(metadata): pin --keep-dirlinks cross-platform chmod bypass safety - #5803
Merged
oferchen merged 2 commits intoJun 15, 2026
Merged
Conversation
Add a cross-platform regression test asserting that apply_file_metadata_with_options succeeds through a symlinked destination directory under --keep-dirlinks on Linux, macOS, and Windows. Pins the guarantee from PR #5793 (macOS chmod bypass) and PRs #5798/#5799 (extension to four more chmod sites), and codifies that Linux (openat2 RESOLVE_BENEATH sandboxes parents only) and Windows (chmod no-op) are clean by construction.
1 of 2 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
#5803) Add a cross-platform regression test asserting that apply_file_metadata_with_options succeeds through a symlinked destination directory under --keep-dirlinks on Linux, macOS, and Windows. Pins the guarantee from PR #5793 (macOS chmod bypass) and PRs #5798/#5799 (extension to four more chmod sites), and codifies that Linux (openat2 RESOLVE_BENEATH sandboxes parents only) and Windows (chmod no-op) are clean by construction.
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
keep_dirlinks_bypass_is_cross_platform_safeincrates/metadata/src/apply/tests.rsalongside the existingkeep_dirlinks_bypasses_secure_chmod_sandbox(macOS-only) test, pinning the guarantee thatapply_file_metadata_with_optionssucceeds through a symlinked destination directory under--keep-dirlinkson Linux, macOS, and Windows.openat2(RESOLVE_BENEATH)sandboxes parent components only, leaf symlink is legal under--keep-dirlinks) and Windows chmod is a no-op (FILE_ATTRIBUTE_READONLY); any future refactor that breaks the bypass surfaces here.Test plan
metadata::apply::tests::keep_dirlinks_bypass_is_cross_platform_safe