fix: protect IFEO debugger and confirm privacy registry writes#813
Merged
Merged
Conversation
Round 2c of the audit — registry-mutating surfaces made safer/confirmed: - AppBlockerService.BlockApp wrote its IFEO Debugger value unconditionally, clobbering any existing one. If that value belonged to a legitimately-debugged app it was both broken and unrecoverable (UnblockApp only removes SysManager's own value). BlockApp now refuses when an external Debugger is already present. - PrivacyViewModel.ApplyChanges wrote registry toggles with no confirmation. It now prompts via DialogService.Confirm (stating the change count and how to revert); declining keeps changes pending and writes nothing. ServicesViewModel (start/stop/disable) and AppBlockerViewModel already confirmed, and ContextMenu toggles are instantly reversible, so they were left as-is. Test: PrivacyViewModelTests asserts a declined confirm writes nothing and keeps the change pending.
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.
Round 2c of the audit — registry-mutating surfaces made safer and confirmed.
App Blocker no longer clobbers an existing debugger (P1)
AppBlockerService.BlockAppwrote its IFEODebuggervalue unconditionally. If the target already had aDebuggerset (e.g. a legitimately-debugged app), it was overwritten — breaking that setup, and unrecoverable sinceUnblockApponly removes SysManager's own value.BlockAppnow refuses when an externalDebuggeris already present, leaving it intact.Privacy changes now confirm before writing the registry
PrivacyViewModel.ApplyChangeswrote toggles to the registry with no prompt. It now callsDialogService.Confirmfirst (stating the change count and how to revert); declining keeps the changes pending and writes nothing.Scope note
ServicesViewModel(start/stop/disable) andAppBlockerViewModelalready confirmed; ContextMenu toggles are instantly reversible — all left as-is to avoid redundant prompts.Test & regression
PrivacyViewModelTests: a declined confirm writes nothing and keeps the change pending (injectedIDialogService).