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.
feat: sign and notarize macOS DMG releases #18
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 our terms of service and privacy 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.
feat: sign and notarize macOS DMG releases #18
Changes from all commits
bb8fe42File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '130,190p' .github/workflows/release.ymlRepository: DevVig/microbridge
Length of output: 2591
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 1483
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 1534
🏁 Script executed:
sed -n '1,220p' .github/workflows/release.ymlRepository: DevVig/microbridge
Length of output: 8789
🌐 Web query:
Apple codesign -dv does not verify integrity spctl assess notarization stapler validate documentation💡 Result:
The tools codesign, spctl, and stapler serve distinct roles in verifying the integrity and notarization status of macOS software [1][2][3]. It is inaccurate to state that codesign does not verify integrity; rather, it verifies code signature integrity, while other tools verify notarization status [4][3]. 1. codesign: This tool verifies the integrity of the code signature itself [4][3]. It confirms that the binary is signed, the signature is cryptographically sound, and that all sealed components (the executable code and resources) remain unaltered [4]. Running codesign -vvv --deep --strict /path/to/app verifies that the app's signature is structurally and cryptographically valid [1]. 2. spctl: This tool assesses whether the software is authorized by system policies, including Gatekeeper [2][5]. To check if an app is notarized, you use spctl --assess --verbose /path/to/app [1][2]. A successful result indicates that the app is notarized (e.g., source=Notarized Developer ID) [6]. It essentially asks the system policy daemon (syspolicyd) to evaluate the app against current security requirements, which includes checking for a notarization ticket [2]. 3. stapler: This tool is used to attach (staple) a notarization ticket to an app bundle, allowing the app to be verified offline [7][8]. The command stapler validate /path/to/app confirms whether a notarization ticket is successfully stapled to the bundle [9][10]. If an app is notarized but the ticket is not stapled, stapler validate will report that no ticket is found, even if the app is notarized online [3][10]. In summary, codesign confirms the app's internal integrity (that it hasn't been modified since it was signed), while spctl and stapler are used to verify the app's notarization status with Apple [1][2][3]. If you need to confirm both, you must use both categories of tools [2][10].
Citations:
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 3119
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 252
Make release validation fail closed.
.github/workflows/release.yml:159-160spctl --assessandcodesign -dvhere are only diagnostics, and|| truelets the release continue even when the DMG is untrusted or unstapled. Replace this with a real verification step that fails the job, e.g.codesign --verify --deep --strictandstapler validate.🤖 Prompt for AI Agents
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use
<target>in the documented DMG filename.The published suffix is the complete target triple, such as
aarch64-apple-darwin, rather than only the architecture.📝 Committable suggestion
🤖 Prompt for AI Agents
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 2587
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 8623
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 3138
Move the release marker out of
Microbridge.app. The release workflow signs the app bundle, and writing.microbridge-releaseafter copying mutates that signed bundle and can break Gatekeeper/code-signature validation. Store the marker in a separate state directory instead.🤖 Prompt for AI Agents
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.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 4260
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 591
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 889
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 156
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 5746
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 2075
🏁 Script executed:
Repository: DevVig/microbridge
Length of output: 1877
Keep quarantine on the installed app bundle
install_app_bundle()clearscom.apple.quarantinefor both the DMG and tarball paths, which suppresses Gatekeeper for the downloaded app. Leave the xattr intact and let macOS enforce trust on first launch.🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.