Skip to content

Commit 0669e5c

Browse files
committed
Make sure we sign nested macOS binaries.
1 parent 170ea26 commit 0669e5c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/sign-and-deploy.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,18 @@ sign_macos_app() {
307307
security find-identity -v -p codesigning | grep -q "$MACOS_IDENTITY" \
308308
|| error "Signing identity not found: $MACOS_IDENTITY"
309309

310-
# Sign with hardened runtime
310+
# Sign all nested binaries first (node-pty prebuilds, etc.)
311+
# --deep doesn't reliably reach into Resources subdirectories
312+
log "Signing nested binaries..."
313+
find "$app_path" \( -name "*.node" -o -name "*.dylib" -o -name "spawn-helper" \) -type f | while read -r binary; do
314+
log " Signing: ${binary#"$app_path/"}"
315+
codesign --force --sign "$MACOS_IDENTITY" \
316+
--options runtime \
317+
--timestamp \
318+
"$binary"
319+
done
320+
321+
# Sign the outer .app bundle
311322
codesign --force --deep --sign "$MACOS_IDENTITY" \
312323
--options runtime \
313324
--timestamp \

0 commit comments

Comments
 (0)