Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Comment on lines +59 to +64
Copy link

Copilot AI Apr 27, 2026

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 to runs-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 separate ubuntu-latest job and gating the macOS matrix job with needs:.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grep patterns here are treated as regular expressions, so the . characters match any character. That means a malformed key like comXappleXsecurityXapp-sandbox would still be matched and fail the job even though the exact entitlement key isn't present. Use fixed-string matching (e.g., grep -Fq) or escape the dots so the check only triggers on the exact entitlement key string.

Suggested change
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 uses AI. Check for mistakes.
Copy link

Copilot AI Apr 27, 2026

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.

Suggested change
if ! grep -q "com.apple.security.$KEY" "$PLIST"; then
if ! grep -Fq "com.apple.security.$KEY" "$PLIST"; then

Copilot uses AI. Check for mistakes.
echo "::error::Required hardened-runtime carve-out missing from $PLIST: com.apple.security.$KEY"
exit 1
fi
done
echo "Entitlements OK: no sandbox, all 3 hardened-runtime carve-outs present."

- name: Build and Release
id: tauri
uses: tauri-apps/tauri-action@v0
Expand Down
Loading