-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(shields): unlock idempotently when config already mutable (#7430) #7629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
88511bc
fix(shields): unlock idempotently when config already mutable (#7430)
yimoj 3396a8d
Merge origin/main into fix/7430-clone-restore-shields-guard
yimoj 33b70e9
test(shields): assert config file modes unchanged on idempotent unloc…
yimoj 593d37a
fix(sandbox): revalidate mutable posture after capture
apurvvkumaria 34a285b
merge(main): sync PR #7629 with current main
apurvvkumaria fcf5b17
test(sandbox): prove mutable unlock is a no-op
apurvvkumaria d36274a
merge(main): refresh PR #7629 base
apurvvkumaria 67ec5af
test(sandbox): harden mutable posture assertions
apurvvkumaria 6173709
test(sandbox): preserve rejected mutable modes
apurvvkumaria 32c1b96
merge(main): sync PR #7629 with current main
apurvvkumaria aec2516
merge(main): sync PR #7629 with current main
apurvvkumaria aab8e4a
merge(main): sync PR #7629 with current main
apurvvkumaria ba00d5d
Merge branch 'main' into fix/7430-clone-restore-shields-guard
cjagwani 210f7c8
merge: sync main into config guard hardening
apurvvkumaria bbe775b
merge(main): sync config guard hardening
apurvvkumaria e2817f9
merge(main): refresh config guard hardening
apurvvkumaria 5b5cee9
merge(main): refresh config guard hardening
apurvvkumaria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The directory check happens before
_snapshot_raw_pair(), but this tree is already sandbox-writable. If a sandbox process changes the parent or config directory during capture,_verify_mutable_files()still passes and this branch returns success without rechecking the directory. I reproduced_transition("unlock", ...)succeeding with final config-directory mode0700. Capture the pair, then validate the full mutable posture (for example_verify_mutable_posture(opened, pair, identity)) and add a directory-drift regression.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed at exact signed/Verified head
32c1b9698. The already-mutable unlock path now captures with_snapshot_raw_pair()and then calls_verify_mutable_posture(opened, pair, identity)before returning. The regression mutates the config directory to0700during capture and requires fail-closedconfig-not-mutable; the companion rejected-mode coverage also proves a0600file remains unchanged. The focused guard suite passes 45/45 and exact-range hooks pass. Leaving this thread open for your re-review.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exact head update: aec2516 is now current-main synced and GitHub Verified; the feature diff is unchanged. The full mutable-posture revalidation and directory-drift regression remain in place. Exact-head guard tests pass 45/45 under the repository Python 3.11 environment, exact-range hooks pass, and the fresh WSL, macOS, CLI, CodeQL, and E2E gates are green. Leaving the thread open for your re-review.