- Notifications
You must be signed in to change notification settings - Fork5
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
ethanndickson commentedJul 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 byGraphite. Learn more aboutstacking. |
c7dbde8 toef8832aCompareea87f52 to5bf788fCompare5bf788f to547fd97Compareef8832a toe32d7deCompareUh oh!
There was an error while loading.Please reload this page.
547fd97 to6687411Compareeebf562 to291e5a1Compare6687411 toef370dbCompare291e5a1 tob0c196fCompareef370db to55319f4Compareb0c196f tob81afc9Compare55319f4 to8670f11Compareb81afc9 toe96075eComparebe347a8 toe6a3578Comparea4b58e5 tobd905aeComparee6a3578 toa1864f6Comparebd905ae to33931d6Comparea1864f6 to8b4c8cdCompare8b4c8cd to78fd6c0Compare33931d6 to0999089Compare78fd6c0 toa5d5337Compare0999089 to1453e77Comparea5d5337 toc450bd4Compare1453e77 tod09250bCompareThere 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, notinvalidIdentifier. This validation is checking the bundle name, not the identifier, so it should throw a different error type or the existinginvalidIdentifier case should be renamed to be more generic.
| throw.invalidIdentifier(identifier:infoPlist[infoNameKey]as?String) | |
| throw.invalidName(name:infoPlist[infoNameKey]as?String) |
d09250b tod286679Comparec450bd4 to557e4feCompareethanndickson commentedAug 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 to6b4106aCompareff169e3 intomainUh oh!
There was an error while loading.Please reload this page.

Uh 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