Repository navigation
Preserve PowerShell relative paths in the elevated Windows sandbox - #49690
Merged
copyberry[bot] merged 1 commit intoSep 30, 2026
Conversation
…49690) ## Why An inaccessible user profile directory can prevent sandboxed PowerShell from preserving its working directory and resolving relative paths in a project beneath that profile. ## What changed Pass `USERPROFILE` to elevated setup and refresh. When the command's working directory is beneath an absolute profile path, grant the sandbox group non-inheriting `FILE_READ_ATTRIBUTES` access to the profile directory. Preserve existing permissions and deny ACEs during non-inheriting ACL updates without propagating changes to descendants. Expand generic deny masks when checking for conflicting permissions. ## Testing Add a Windows regression test that checks PowerShell's working directory and reading `.\public.txt` beneath a protected profile. Add an ACL test that verifies a non-inheriting grant leaves an unprotected child's security descriptor unchanged. GitOrigin-RevId: 7f142a7ffdee795c3255d4a6e79568fa9391c055
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/7f142a7ffdee795c3255d4a6e79568fa9391c055
branch
from
September 30, 2026 17:51
d5248d4 to
7e8878f
Compare
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/7f142a7ffdee795c3255d4a6e79568fa9391c055
branch
September 30, 2026 17:51
mdavies
temporarily deployed
to
issue-triage
September 30, 2026 17:53 — with
GitHub Actions
Inactive
mdavies
temporarily deployed
to
issue-triage
September 30, 2026 17:53 — with
GitHub Actions
Inactive
mdavies
temporarily deployed
to
issue-triage
September 30, 2026 17:53 — with
GitHub Actions
Inactive
mdavies
temporarily deployed
to
issue-triage
September 30, 2026 17:54 — with
GitHub Actions
Inactive
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Preserve PowerShell relative paths in the elevated Windows sandbox
Why
An inaccessible user profile directory can prevent sandboxed PowerShell from preserving its working directory and resolving relative paths in a project beneath that profile.
What changed
Pass
USERPROFILEto elevated setup and refresh. When the command's working directory is beneath an absolute profile path, grant the sandbox group non-inheritingFILE_READ_ATTRIBUTESaccess to the profile directory.Preserve existing permissions and deny ACEs during non-inheriting ACL updates without propagating changes to descendants. Expand generic deny masks when checking for conflicting permissions.
Testing
Add a Windows regression test that checks PowerShell's working directory and reading
.\public.txtbeneath a protected profile. Add an ACL test that verifies a non-inheriting grant leaves an unprotected child's security descriptor unchanged.