fix: harden updater preflight and restart diagnostics - #5
Merged
Conversation
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.
Scope
Hardens the v0.2.2 Beta updater after the live v0.2.0 → v0.2.1 incident. This draft PR does not modify Stable
main, publish a Beta, or change the live installation.Current remediation
update.loguse a common alias-resistant append path;Review history
Initial head
7729cc4ac8bb2d84680a0e6f10b64edac09bea66failed independent review for a create-collision alias retry and insufficient behavioral coverage. Those findings were closed at828805040ed2de9a4be384ffbe253f1f31a1968b.The fresh re-review of
828805040ed2de9a4be384ffbe253f1f31a1968bfound one remaining High issue: an already-existing diagnostic file could be replaced by an alias between validation and opening. That path was remediated, and the same protection was applied to ordinaryupdate.log.Intermediate CI
31747364301exposed a Windows path-spelling false positive in an additional handle-path text comparison. That comparison was removed without weakening the no-follow open, handle reparse validation, post-open ancestor checks, or descriptor/path identity validation.Frozen accepted candidate
ca9180839bae1b78c39884e5b72c9d53e66b33ca613aab26111971aa7010264ff265f27606416731e6ddafd3ce6cbfffb8eb1403297fc8b27d0ed7e011e29ebf025c042463c9d7492535d1d6f571c5ccscripts/update_helper.py,tests/test_update_channels.py,tests/test_update_lock_alias_regression.py31747621925— SUCCESSIndependent second-remediation re-review
RESULT: PASS
The reviewer independently reproduced both the restart-diagnostic and
runtime/update.logexisting-file replacement attacks against the production open path. Both were rejected and both protected targets remained byte-for-byte unchanged. Windows no-follow/reparse-handle controls, POSIXO_NOFOLLOW, O_EXCL retry, hardlink controls, old-parent/new-helper behavior, mixed/clean installs, status-120 diagnostics, rollback/recovery, privacy, and the full three-file security/regression sweep passed with no remaining findings.PR #5 remains intentionally draft and targets
develop. The candidate has passed the required independent review; integration intodevelopnow requires Ethan's separate explicit merge authorization. No Beta has been published and the live installation remains on Stable v0.2.1.