Skip to content

fix: prevent repeated helper installation prompts on macOS Tahoe - #221

Open
BoL-zz wants to merge 1 commit into
MetaCubeX:metafrom
BoL-zz:fix/issue-209-helper-xpc-validation
Open

BoL-zz wants to merge 1 commit into
MetaCubeX:metafrom
BoL-zz:fix/issue-209-helper-xpc-validation

Conversation

@BoL-zz

@BoL-zz BoL-zz commented Sep 1, 2026

Copy link
Copy Markdown

Summary

  • Resolve helper XPC clients through Security.framework.
  • Validate the connecting client before accepting the XPC connection.
  • Add regression coverage for accepted and rejected client identifiers.

Why

When the helper runs as a privileged launch daemon, NSRunningApplication may not provide the connecting application's bundle identifier. This rejects a valid ClashX Meta connection and can trigger repeated helper installation prompts on macOS Tahoe.

The new validation resolves the live process through Security.framework and checks its signing identifier before accepting the connection.

Testing

  • Ran Tests/HelperXPCSecurity/run.sh.
    • Verified that the ClashX Meta identifier is accepted.
    • Verified that an unrelated identifier is rejected.
  • Built the Helper target in Release configuration as a universal arm64 and x86_64 binary with Xcode 27.
  • Manually verified the packaged build on a second Mac: the helper installed and connected without repeated prompts.

Fixes #209

Resolve the connecting process with Security.framework before accepting the helper XPC connection. This avoids rejecting valid clients when NSRunningApplication does not provide a bundle identifier to the privileged helper.

Add regression coverage for accepted and rejected client identifiers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant