-
Notifications
You must be signed in to change notification settings - Fork 0
ci(release): pre-notarize entitlements gate #60
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,29 @@ jobs: | |||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
| echo "All manifests agree on version $CARGO_V" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| - name: Validate entitlements | ||||||||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||
| # Pre-notarize gate. Catches release-blocker plist misconfigs BEFORE | ||||||||||||||||||||||||||||||
| # burning macOS-runner minutes on signing + notarization. | ||||||||||||||||||||||||||||||
| # Origin: v0.2.0/v0.2.1 sandbox incident (#18, #41). | ||||||||||||||||||||||||||||||
| PLIST=src-tauri/Entitlements.plist | ||||||||||||||||||||||||||||||
| if [ ! -f "$PLIST" ]; then | ||||||||||||||||||||||||||||||
| echo "::error::$PLIST not found" | ||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
| if grep -q 'com.apple.security.app-sandbox' "$PLIST"; then | ||||||||||||||||||||||||||||||
| echo "::error::App Sandbox must not be enabled for Developer ID distribution — it breaks the auto-updater. See #18/#41." | ||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||
| for KEY in cs.allow-jit cs.allow-unsigned-executable-memory cs.disable-library-validation; do | ||||||||||||||||||||||||||||||
| if ! grep -q "com.apple.security.$KEY" "$PLIST"; then | ||||||||||||||||||||||||||||||
|
Comment on lines
+70
to
+75
|
||||||||||||||||||||||||||||||
| if grep -q 'com.apple.security.app-sandbox' "$PLIST"; then | |
| echo "::error::App Sandbox must not be enabled for Developer ID distribution — it breaks the auto-updater. See #18/#41." | |
| exit 1 | |
| fi | |
| for KEY in cs.allow-jit cs.allow-unsigned-executable-memory cs.disable-library-validation; do | |
| if ! grep -q "com.apple.security.$KEY" "$PLIST"; then | |
| if grep -Fq 'com.apple.security.app-sandbox' "$PLIST"; then | |
| echo "::error::App Sandbox must not be enabled for Developer ID distribution — it breaks the auto-updater. See #18/#41." | |
| exit 1 | |
| fi | |
| for KEY in cs.allow-jit cs.allow-unsigned-executable-memory cs.disable-library-validation; do | |
| if ! grep -Fq "com.apple.security.$KEY" "$PLIST"; then |
Copilot
AI
Apr 27, 2026
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.
The required-key check also uses regex grep, so the . characters in com.apple.security.$KEY match any character. This can produce false positives and allow a typo’d entitlement key to pass validation. Prefer fixed-string matching (e.g., grep -Fq "com.apple.security.$KEY") so the gate reliably enforces the exact entitlement keys.
| if ! grep -q "com.apple.security.$KEY" "$PLIST"; then | |
| if ! grep -Fq "com.apple.security.$KEY" "$PLIST"; then |
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.
This step runs inside
publish-tauri, which is configured toruns-on: macos-latest. It will still consume macOS runner minutes even when failing fast. If the goal is to avoid spending macOS minutes on misconfigurations, consider moving version/entitlements validation into a separateubuntu-latestjob and gating the macOS matrix job withneeds:.