From acef708d21df49d00bf1c4b0e07b111ec04df06e Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Tue, 17 Nov 2026 20:48:31 +0000 Subject: [PATCH] fix: update Sparkle to 2.10.1 for its security fixes Sparkle 2.7.0 is affected by CVE-2025-10015 and CVE-2025-10016, fixed in 2.7.2. The second lets a local unprivileged process race to connect to Autoupdate when it is started as root and have its own package installed, which is how this app installs updates. Two further advisories, CVE-2026-47121 and CVE-2026-47122, are fixed in 2.9.2. - Pin Sparkle 2.10.1, the newest stable release. - Download sign_update from the same release in release-sign.yml, with its checksum. - Isolate UpdaterService to the main actor. Since Sparkle 2.8, SPUStandardUpdaterController, SPUUpdater and SPUUpdaterDelegate are marked NS_SWIFT_UI_ACTOR, which Swift 6 enforces. SUVersionDisplay and SPUStandardUserDriverDelegate are not, so the two methods implementing them are nonisolated. Sparkle 2.10 requires macOS 12. The app requires macOS 14. --- .github/workflows/release-sign.yml | 4 ++-- Coder-Desktop/Coder-Desktop/UpdaterService.swift | 9 +++++++-- Coder-Desktop/project.yml | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-sign.yml b/.github/workflows/release-sign.yml index 8984be07..57af5744 100644 --- a/.github/workflows/release-sign.yml +++ b/.github/workflows/release-sign.yml @@ -497,8 +497,8 @@ jobs: - name: Install Sparkle's signing tool run: | set -euo pipefail - curl -fsSL -o "$RUNNER_TEMP/Sparkle.tar.xz" https://github.com/sparkle-project/Sparkle/releases/download/2.7.0/Sparkle-2.7.0.tar.xz - echo "09fed60cca507d2dc542c86c22e525598af5483954a5c66366ce039647ec88e9 $RUNNER_TEMP/Sparkle.tar.xz" | shasum -a 256 -c + curl -fsSL -o "$RUNNER_TEMP/Sparkle.tar.xz" https://github.com/sparkle-project/Sparkle/releases/download/2.10.1/Sparkle-2.10.1.tar.xz + echo "1a856d2a9edb8e628de88121d7be04cf0e2167f8641650b78fca00b14244cf27 $RUNNER_TEMP/Sparkle.tar.xz" | shasum -a 256 -c mkdir -p "$RUNNER_TEMP/sparkle" tar -xJf "$RUNNER_TEMP/Sparkle.tar.xz" -C "$RUNNER_TEMP/sparkle" ./bin/sign_update diff --git a/Coder-Desktop/Coder-Desktop/UpdaterService.swift b/Coder-Desktop/Coder-Desktop/UpdaterService.swift index 78fc2ad5..4724a143 100644 --- a/Coder-Desktop/Coder-Desktop/UpdaterService.swift +++ b/Coder-Desktop/Coder-Desktop/UpdaterService.swift @@ -1,6 +1,9 @@ import Sparkle import SwiftUI +/// Since Sparkle 2.8, `SPUStandardUpdaterController`, `SPUUpdater` and +/// `SPUUpdaterDelegate` are isolated to the main actor. +@MainActor final class UpdaterService: NSObject, ObservableObject { /// The auto-updater can be entirely disabled by setting the /// `disableUpdater` UserDefaults key to `true`. This is designed for use in @@ -86,8 +89,10 @@ extension UpdaterService: SPUUpdaterDelegate { } } +/// `SUVersionDisplay` and `SPUStandardUserDriverDelegate` are not isolated to +/// the main actor, so the methods that implement them cannot be either. extension UpdaterService: SUVersionDisplay { - func formatUpdateVersion( + nonisolated func formatUpdateVersion( fromUpdate update: SUAppcastItem, andBundleDisplayVersion inOutBundleDisplayVersion: AutoreleasingUnsafeMutablePointer, withBundleVersion bundleVersion: String @@ -102,7 +107,7 @@ extension UpdaterService: SUVersionDisplay { } extension UpdaterService: SPUStandardUserDriverDelegate { - func standardUserDriverRequestsVersionDisplayer() -> (any SUVersionDisplay)? { + nonisolated func standardUserDriverRequestsVersionDisplayer() -> (any SUVersionDisplay)? { self } } diff --git a/Coder-Desktop/project.yml b/Coder-Desktop/project.yml index f738e1f4..40e17a07 100644 --- a/Coder-Desktop/project.yml +++ b/Coder-Desktop/project.yml @@ -135,7 +135,9 @@ packages: revision: 09b155d Sparkle: url: https://github.com/sparkle-project/Sparkle - exactVersion: 2.7.0 + # When changing this, change the sign_update download in + # .github/workflows/release-sign.yml to the same release. + exactVersion: 2.10.1 targets: