-
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c7dbde8 to
ef8832a
Compare
ea87f52 to
5bf788f
Compare
5bf788f to
547fd97
Compare
ef8832a to
e32d7de
Compare
547fd97 to
6687411
Compare
eebf562 to
291e5a1
Compare
6687411 to
ef370db
Compare
291e5a1 to
b0c196f
Compare
ef370db to
55319f4
Compare
b0c196f to
b81afc9
Compare
55319f4 to
8670f11
Compare
b81afc9 to
e96075e
Compare
be347a8 to
e6a3578
Compare
a4b58e5 to
bd905ae
Compare
e6a3578 to
a1864f6
Compare
bd905ae to
33931d6
Compare
a1864f6 to
8b4c8cd
Compare
8b4c8cd to
78fd6c0
Compare
33931d6 to
0999089
Compare
78fd6c0 to
a5d5337
Compare
0999089 to
1453e77
Compare
a5d5337 to
c450bd4
Compare
1453e77 to
d09250b
Compare
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.
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) |
Copilot
AI
Aug 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
d286679
Compare
c450bd4 to
557e4fe
Compare
Merge activity
|
557e4fe to
6b4106a
Compare

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