fix: notarize and staple release DMGs so Gatekeeper accepts them - #459
Open
mvanhorn wants to merge 1 commit into
Open
fix: notarize and staple release DMGs so Gatekeeper accepts them#459mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
.github/workflows/release.yml, add a "Notarize DMG" step in thebuild-signedjob immediately after "Create DMG" and before "Create ZIP archive" / "Calculate checksums" (ordering matters: stapling modifies the DMG, so the sha256 must be computed after stapling - the existing step order already ensures this). The new step, guarded byif [ -f "VibeProxy-${{ matrix.arch }}.dmg" ]to match the workflow's existing non-fatal DMG handling, runs `xcrun notarytool submit "VibeProxy-${{ matrix.arch }}.dmg" --apple-id ... --team-id ...Why this matters
A user downloaded VibeProxy-arm64.dmg from the official releases and found that while the app bundle inside is correctly notarized and stapled (
spctl --assess --type executeaccepts it), the DMG itself is only codesigned, not notarized:spctl --assess --type open --context context:primary-signaturerejects it with "Unnotarized Developer ID" andxcrun stapler validateconfirms no ticket is stapled. The release notes claim "Code Signed & Notarized - No Gatekeeper warnings", so the DMG artifact contradicts the stated guarantee. Root cause is visible in.github/workflows/release.yml: the "Notarize App" step submits and staples onlyVibeProxy.app; the subsequent "Create DMG" step codesigns the DMG via create-dmg's--codesignflag but never submits the DMG to notarytool or staples it.See #398.
Testing
xcrun stapler validateandspctl --assess --type open --context context:primary-signature(verified in-workflow by the new validate/assess commands; workflow YAML validated locally with actionlint/yamllint since CI secrets cannot be exercised from a fork). - Edge case: create-dmg fails and no DMG exists (the step uses|| true) - the notarize step's existence guard skips cleanly instead of erroring on a missing file. - Error path: notarytool returns a non-Accepted status for the DMG - the step prints the notarytool log for the submission id and exits 1, failing the release rather than shipping an unnotarized DMG. - Regression guard: sha256 files still match the final (stapled) DMG bytes because "Calculate checksums" runs after the new notarize/staple step.Fixes #398