- 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
Uh oh!
There was an error while loading.Please reload this page.
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
toef8832a
Compareea87f52
to5bf788f
Compare5bf788f
to547fd97
Compareef8832a
toe32d7de
CompareUh oh!
There was an error while loading.Please reload this page.
547fd97
to6687411
Compareeebf562
to291e5a1
Compare6687411
toef370db
Compare291e5a1
tob0c196f
Compareef370db
to55319f4
Compareb0c196f
tob81afc9
Compare55319f4
to8670f11
Compareb81afc9
toe96075e
Comparebe347a8
toe6a3578
Comparea4b58e5
tobd905ae
Comparee6a3578
toa1864f6
Comparebd905ae
to33931d6
Comparea1864f6
to8b4c8cd
Compare8b4c8cd
to78fd6c0
Compare33931d6
to0999089
Compare78fd6c0
toa5d5337
Compare0999089
to1453e77
Comparea5d5337
toc450bd4
Compare1453e77
tod09250b
CompareThere 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.swift
into a dedicatedValidate.swift
file - Added
xpcPeerRequirement
property 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 |
} | ||
guardlet plistName=infoPlist[infoNameKey]as?String, plistName== expectedNameelse{ | ||
throw.invalidIdentifier(identifier:infoPlist[infoNameKey]as?String) |
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) |
Copilot uses AI. Check for mistakes.
d09250b
tod286679
Comparec450bd4
to557e4fe
Compareethanndickson 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
to6b4106a
Compareff169e3
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.swift
and intoValidate.swift