fix: stabilize and speed up Windows credential ACL verification - #298
Merged
Conversation
ianw-oai
approved these changes
Aug 7, 2026
This was referenced Aug 7, 2026
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
lstat. A missing credential-home root, persistent instability, symbolic links, junctions, and other filesystem failures still fail closed.execFile, preserving the actual subprocess error instead of surfacing only an unexplained synchronousstatus: null.bun test --timeout 30000timeout on every platform; the earlier Windows-only 60-second workaround is not part of the final diff.Root cause
The flaky failure came from two Windows-only races: a descendant could disappear between filesystem enumeration and
lstat, and the synchronous PowerShell test could occasionally return onlystatus: null. Separately, managed credential workflows repeatedly validated the same credential home, and each validation started separate PowerShell processes for ancestry, the home ACL, and descendants. That subprocess startup cost pushed legitimate tests close to the 30-second limit.The batching change removes the repeated PowerShell startup cost without caching or skipping ACL validation. A populated credential-home validation now uses one streaming PowerShell process for all ACL descriptors instead of separate ancestry, home, and descendant PowerShell processes; repair paths still re-inspect after mutation.
Failure evidence
main: https://github.com/openai/codex-security/actions/runs/31132067211/job/92723068033Verification
--randomize --seed 12345 --timeout 30000): 950 passed, 10 platform-specific skips, 0 failed.pnpm pack, and installed-package smoke validation passed.