Repository navigation
Verify the whole signed app before a macOS self-update installs it - #5806
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Conversation
The macOS updater only refused an extracted app signed by another team, and accepted one whose signature it could not read. It now verifies the whole bundle with `codesign --verify --deep --strict` against a requirement pinned to Devolutions' Developer ID, and refuses anything it cannot confirm. - The release archive keeps extended attributes, which hold the signatures of the non-code files in Contents/MacOS, and the build checks the extracted archive against the same requirement before it ships. - The elevated swap verifies the bundle it installs itself, and both it and the app accept only a top-level UniGetUI.app. - The bundle's version must match the release that was offered, so an older signed release is refused. The client and pipeline changes must ship together: archives built without extended attributes no longer pass the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Synchronous full-bundle signature verification blocks the window during manual update checks and needs to run off the UI thread.
1 open issue
What changed in this PR
This PR hardens UniGetUI’s macOS self-updater by requiring full bundle signature verification before installation and preserving the signature data in release archives.
Changes:
- Require trusted Developer ID signatures in both the app and elevated swap script.
- Accept only a top-level, non-symlink bundle and check its version against the offered release.
- Preserve extended attributes, verify packaged archives, and add validation tests.
| File | Description |
|---|---|
src/UniGetUI.Tests/WindowsFacts.cs |
Adds a macOS-only test attribute. |
src/UniGetUI.Tests/MacAppSignatureTests.cs |
Tests signature requirements, rejection paths, and signed fixtures. |
src/UniGetUI.Tests/AutoUpdaterTests.cs |
Tests bundle-to-release version matching. |
src/UniGetUI.Core.Tools/MacUpdateTarget.cs |
Verifies the extracted bundle before elevated replacement. |
src/UniGetUI.Core.Tools.Tests/MacUpdateTargetTests.cs |
Tests rejection of invalid signatures and archive layouts. |
src/UniGetUI.Avalonia/Infrastructure/MacAppSignature.cs |
Adds strict signature verification and bundle version reading. |
src/UniGetUI.Avalonia/Infrastructure/AvaloniaAutoUpdater.cs |
Integrates signature, location, and version checks. |
src/Shared/AutoUpdater.Helpers.cs |
Adds core-version matching for macOS bundles. |
.github/workflows/build-release.yml |
Preserves extended attributes and verifies extracted release archives. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 This pull request will not be approved automatically: it modifies files listed in human-review-paths, so a human review is required.
.github/workflows/build-release.ymlmatches.github/
Integration Details
{
"deliveryId": "cb473b2c-e458-11f1-9866-8266573041ee",
"headSha": "892839dfa26af58aa6c87a65f6d3c46cbf5c648d"
}A manual update check runs on the UI thread, so the full codesign verification and the plutil read froze the window while they ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The security-sensitive macOS updater and archive-format changes require human validation of the release workflow and signed-to-signed updates, including elevated replacement, on both Apple silicon and Intel.
No open issues 🎉
1 resolved since last review
Review effort: Balanced

Summary
The macOS self-updater checked the extracted
UniGetUI.apponly loosely: it refused a bundle signed by another team, but accepted one whose signature or Team ID it could not read, relying on the download hash alone. This makes the check strict and covers every file in the bundle.MacAppSignaturerunscodesign --verify --deep --strictagainst a requirement pinned to a Developer ID Application certificate from Devolutions' team, chained to Apple. Anything it cannot confirm is refused.UniGetUI.app(not a symlink), so both always handle the same bundle.CFBundleShortVersionStringmust match the major.minor.patch of the release that was offered, so an older signed release is refused..tar.gzno longer setsCOPYFILE_DISABLE=1. The signatures of the non-code files inContents/MacOSlive in extended attributes, and without them a full verification of the extracted bundle is impossible. The build now extracts the archive and runs the same check before it ships.The client and pipeline changes must ship in the same release. A client with this change refuses archives built without extended attributes, so a release that has one change but not the other stops macOS self-updates. The pipeline's new check fails the build rather than shipping such an archive.
The Team ID now lives in two places:
DEVOLUTIONS_MAC_DEVELOPER_IDSinAvaloniaAutoUpdaterand the requirement inbuild-release.yml.Testing
MacAppSignatureTestsandMacUpdateTargetTestsuse an ad-hoc signed fixture bundle with the realcodesignandtar. The swap script refuses a bundle that does not meet the requirement, one changed after signing, one not at the top of the archive, and an archive built withCOPYFILE_DISABLE.AutoUpdaterTests.Not yet verified: the release workflow itself, a real self-update between two signed builds, and Intel Macs. A signed beta updating to a second signed beta would cover all three.
🤖 Generated with Claude Code