[feat] Add opt-in Touch ID authentication for guest sudo - #143
Open
Fail-Safe wants to merge 5 commits into
Open
Conversation
Fail-Safe
marked this pull request as ready for review
September 6, 2026 01:57
Fail-Safe
marked this pull request as draft
September 6, 2026 01:58
Fail-Safe
marked this pull request as ready for review
September 6, 2026 17:11
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
sudoThis implements the sudo-scoped portion of #133. It does not attempt to expose Apple Passwords/Keychain data or replace guest login and screen-unlock authentication.
Security model
deviceOwnerAuthenticationWithBiometrics, biometric-set binding, no password fallback, and zero reuse durationValidation
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer make testpassed, including guest unit and contract tests, 210 Swift tests in 47 suites, macOS compatibility/runtime relocation, and QEMU forwarding, power, SSH, and persistent-storage testsc523029; it is not presented as a security review of the subsequent time-sync and diagnostic changescould not satisfy dependenciesbefore reaching the changed configuration scripts. For live testing, cached guest artifacts were refreshed and the app rebuilt; signature and macOS compatibility checks passed. This does not establish a successful clean factory build.Deliberate manual failure-path testing
Tests were performed interactively with real Mac Touch ID and the persistent guest. Each authentication test cleared sudo's cached credentials.
sudo truewith exit status 0 and no guest password.dc06bcf: two unanswered attempts both closed the Touch ID dialog and reported failed authentication without accepting password fallback. The first was timed at exactly 55 seconds; the second was not timed. No numeric exit status was captured for these timeout attempts.dc06bcf: two subsequent interactive test runs completed without a guest password, each reporting exit status 0, with no mismatched-request errors.Normal approval, explicit cancellation, and focus-loss checks were performed before the final timeout/test-command update. Timeout and recovery were repeated after installing the
dc06bcfMac helper and guest scripts in the enrolled VM. Earlier runs against the old installation reproduced the stale-response failure and are not counted as validation of the fix.Remaining UX limitation: host timeout still appears as “Touch ID was not approved”; the shared broker message mentions password fallback even though the dedicated test deliberately refuses it.
Operational boundaries
sudoonlysystemd-timesyncd; existing guests with drift can enable it withsudo systemctl enable --now systemd-timesyncd.serviceand verify synchronization withtimedatectl