Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ethanndickson merged 1 commit intomainfromethan/xpc-validation
Aug 6, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedJul 24, 2025
edited
Loading

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 ofDownload.swift and intoValidate.swift

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedJul 24, 2025
edited
Loading

@ethanndicksonethanndickson self-assigned thisJul 24, 2025
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromc7dbde8 toef8832aCompareJuly 28, 2025 07:50
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromef8832a toe32d7deCompareJuly 30, 2025 09:31
@ethanndicksonethanndickson marked this pull request as ready for reviewJuly 30, 2025 13:11
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromeebf562 to291e5a1CompareJuly 31, 2025 07:26
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch from291e5a1 tob0c196fCompareAugust 4, 2025 02:59
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromb0c196f tob81afc9CompareAugust 4, 2025 03:00
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromb81afc9 toe96075eCompareAugust 4, 2025 03:03
@ethanndicksonethanndicksonforce-pushed theethan/xpc-validation branch 2 times, most recently frombe347a8 toe6a3578CompareAugust 4, 2025 07:58
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch 2 times, most recently froma4b58e5 tobd905aeCompareAugust 4, 2025 08:05
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch frombd905ae to33931d6CompareAugust 4, 2025 08:07
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch from33931d6 to0999089CompareAugust 4, 2025 09:42
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch from0999089 to1453e77CompareAugust 4, 2025 12:54
@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch from1453e77 tod09250bCompareAugust 5, 2025 04:51
Copy link

@CopilotCopilotAI left a 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 fromDownload.swift into a dedicatedValidate.swift file
  • AddedxpcPeerRequirement 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
FileDescription
Coder-Desktop/VPNLib/Validate.swiftNew file containing extracted validation logic with added XPC peer requirement string
Coder-Desktop/VPNLib/Download.swiftRemoved validation code that was moved to Validate.swift
Coder-Desktop/VPN/NEHelperXPCClient.swiftAdded code signing requirement to XPC client connection
Coder-Desktop/Coder-DesktopHelper/HelperXPCListeners.swiftAdded code signing requirements to both XPC server listeners
Coder-Desktop/Coder-Desktop/AppHelperXPCClient.swiftAdded code signing requirement to app helper XPC client

}

guardlet plistName=infoPlist[infoNameKey]as?String, plistName== expectedNameelse{
throw.invalidIdentifier(identifier:infoPlist[infoNameKey]as?String)
Copy link
Preview

CopilotAIAug 6, 2025

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.

Suggested change
throw.invalidIdentifier(identifier:infoPlist[infoNameKey]as?String)
throw.invalidName(name:infoPlist[infoNameKey]as?String)

Copilot uses AI. Check for mistakes.

@ethanndicksonethanndicksonforce-pushed theethan/networking-in-launchdaemon branch fromd09250b tod286679CompareAugust 6, 2025 03:37
@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedAug 6, 2025
edited
Loading

Merge activity

  • Aug 6, 3:39 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Aug 6, 3:45 AM UTC:Graphite rebased this pull request as part of a merge.
  • Aug 6, 3:47 AM UTC:@ethanndickson merged this pull request withGraphite.

@ethanndicksonethanndickson changed the base branch fromethan/networking-in-launchdaemon tographite-base/206August 6, 2025 03:42
@ethanndicksonethanndickson changed the base branch fromgraphite-base/206 tomainAugust 6, 2025 03:44
@ethanndicksonethanndickson merged commitff169e3 intomainAug 6, 2025
4 checks passed
@ethanndicksonethanndickson deleted the ethan/xpc-validation branchAugust 6, 2025 03:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@ethanndicksonethanndickson

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp