Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: import Apple CA certs into login keychain instead of codesign wrapper

Louis Beaumontf1d7a8c9267a
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 5700335ad..911e3c121 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -745,7 +745,10 @@ jobs:
# On macOS 26 self-hosted runners, Tauri's bundler creates a temp keychain
# and sets the search list to just login+temp, dropping System.keychain.
# codesign then can't find Apple intermediate certs for chain verification.
- # Fix: create a codesign wrapper that re-adds System.keychain before signing.
+ #
+ # Fix: import Apple intermediate CA certs directly into the login keychain.
+ # This way codesign finds them regardless of which keychains are in the
+ # search list — no PATH wrapper needed (Tauri calls /usr/bin/codesign directly).
security unlock-keychain -p '' ~/Library/Keychains/login.keychain-db 2>/dev/null || true
# Download Apple intermediate certs if not cached
@@ -753,29 +756,25 @@ jobs:
if [ ! -f ~/apple-certs/DeveloperIDG2CA.cer ]; then
curl -sL -o ~/apple-certs/DeveloperIDG2CA.cer https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer
curl -sL -o ~/apple-certs/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
- curl -sL -o ~/apple-certs/AppleIncRootCertificate.cer https://www.apple.com/appleca/AppleIncRootCertificate.cer
+ curl -sL -o ~/apple-certs/AppleIncRootCertificate.cer https://www.apple.com/certificateauthority/AppleIncRootCertificate.cer
fi
- # Create a codesign wrapper that injects System.keychain into the search list
- # before each codesign call, so intermediate certs are always findable
- mkdir -p ~/bin
- cat > ~/bin/codesign << 'WRAPPER'
- #!/bin/bash
- # Re-add System.keychain to search list before every codesign call
- current=$(/usr/bin/security list-keychains -d user 2>/dev/null | tr -d '"' | tr -d ' ')
- if ! echo "$current" | grep -q "System.keychain"; then
- keychains=()
- while IFS= read -r kc; do
- [ -n "$kc" ] && keychains+=("$kc")
- done <<< "$current"
- keychains+=("/Library/Keychains/System.keychain")
- /usr/bin/security list-keychains -d user -s "${keychains[@]}" 2>/dev/null
- fi
- exec /usr/bin/codesign "$@"
- WRAPPER
- chmod +x ~/bin/codesign
- echo "$HOME/bin" >> $GITHUB_PATH
- echo "Installed codesign wrapper to inject System.keychain"
+ # Import Apple CA certs into login keychain so codesign can build the chain
+ for cert in ~/apple-certs/*.cer; do
+ if [ -f "$cert" ]; then
+ security import "$cert" -t cert -k ~/Library/Keychains/login.keychain-db 2>/dev/null || true
+ echo "Imported $(basename "$cert") into login keychain"
+ fi
+ done
+
+ # Also import into System.keychain as belt-and-suspenders
+ for cert in ~/apple-certs/*.cer; do
+ if [ -f "$cert" ]; then
+ sudo security import "$cert" -t cert -k /Library/Keychains/System.keychain 2>/dev/null || true
+ fi
+ done
+
+ echo "Imported Apple intermediate CA certificates for codesign chain verification"
- name: Compute Tauri build args
id: tauri-args
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index fa22fae4e..e24b28899 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8097,7 +8097,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.486"
+version = "2.0.487"
dependencies = [
"anyhow",
"arboard",