- Notifications
You must be signed in to change notification settings - Fork 5
fix: add code signing requirements to xpc connections#206
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
Conversation
ethanndickson commented Jul 24, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
ethanndickson commented Jul 24, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c7dbde8 to ef8832aCompareea87f52 to 5bf788fCompare5bf788f to 547fd97Compareef8832a to e32d7deCompareUh oh!
There was an error while loading. Please reload this page.
547fd97 to 6687411Compareeebf562 to 291e5a1Compare6687411 to ef370dbCompare291e5a1 to b0c196fCompareef370db to 55319f4Compareb0c196f to b81afc9Compare55319f4 to 8670f11Compareb81afc9 to e96075eComparebe347a8 to e6a3578Comparea4b58e5 to bd905aeComparee6a3578 to a1864f6Comparebd905ae to 33931d6Comparea1864f6 to 8b4c8cdCompare8b4c8cd to 78fd6c0Compare33931d6 to 0999089Compare78fd6c0 to a5d5337Compare0999089 to 1453e77Comparea5d5337 to c450bd4Compare1453e77 to d09250bCompareThere 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.
Pull Request Overview
This PR enhances security by adding code signing requirements to XPC connections to prevent unauthorized binaries from connecting to the Helper service. The changes implement validation that ensures only binaries signed by the Coder Apple development team can establish XPC connections.
Key changes:
- Refactored validation logic from
Download.swiftinto a dedicatedValidate.swiftfile - Added
xpcPeerRequirementproperty to enforce code signing requirements on XPC connections - Applied code signing validation to all XPC connection points in the application
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Coder-Desktop/VPNLib/Validate.swift | New file containing extracted validation logic with added XPC peer requirement string |
| Coder-Desktop/VPNLib/Download.swift | Removed validation code that was moved to Validate.swift |
| Coder-Desktop/VPN/NEHelperXPCClient.swift | Added code signing requirement to XPC client connection |
| Coder-Desktop/Coder-DesktopHelper/HelperXPCListeners.swift | Added code signing requirements to both XPC server listeners |
| Coder-Desktop/Coder-Desktop/AppHelperXPCClient.swift | Added code signing requirement to app helper XPC client |
| } | ||
| guard let plistName = infoPlist[infoNameKey] as? String, plistName == expectedName else{ | ||
| throw .invalidIdentifier(identifier: infoPlist[infoNameKey] as? String) |
CopilotAIAug 6, 2025
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 error type should be a name-specific validation error, not invalidIdentifier. This validation is checking the bundle name, not the identifier, so it should throw a different error type or the existing invalidIdentifier case should be renamed to be more generic.
| throw.invalidIdentifier(identifier:infoPlist[infoNameKey]as?String) | |
| throw.invalidName(name:infoPlist[infoNameKey]as?String) |
d09250b to d286679Comparec450bd4 to 557e4feCompareethanndickson commented Aug 6, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Merge activity
|
557e4fe to 6b4106aCompareff169e3 into mainUh oh!
There was an error while loading. Please reload this page.

Continues to address #201.
I've manually tested that this change prevents binaries not signed by the Coder Apple development team from connecting to the Helper over XPC.
Most of the PR diff is me moving the validator out of
Download.swiftand intoValidate.swift