Skip to content

Conversation

shijie-oai
Copy link
Collaborator

@shijie-oai shijie-oai commented Oct 7, 2025

Summary

  • Added code signing for MacOS.

Before - UNSIGNED codex-aarch64

Screenshot 2025-10-08 at 11 53 28 AM

After - SIGNED codex-aarch64

Screenshot 2025-10-08 at 11 52 20 AM

@shijie-oai shijie-oai force-pushed the shijie/codesign-binary branch 2 times, most recently from 8786553 to 46c4c5a Compare October 7, 2025 20:14
@shijie-oai shijie-oai changed the base branch from main to gpeal/macos-sign October 7, 2025 20:14
@shijie-oai shijie-oai force-pushed the shijie/codesign-binary branch 4 times, most recently from a219c47 to 6c7d335 Compare October 7, 2025 23:47
@shijie-oai shijie-oai changed the base branch from gpeal/macos-sign to main October 8, 2025 00:57
@shijie-oai shijie-oai force-pushed the shijie/codesign-binary branch 3 times, most recently from 333724a to 795ac1d Compare October 8, 2025 18:44

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on doc, a cancelled job still runs steps with condition eval to true and therefore the keychain cleanup is still executed because of always().

Comment on lines 160 to 180
codesign_hashes=()
# SO this is breaking because our cert (at least the testing one) is not generated as codesign
while IFS= read -r hash; do
[[ -n "$hash" ]] && codesign_hashes+=("$hash")
done < <(security find-identity -v -p codesigning "$keychain_path" \
| sed -n 's/.*\([0-9A-F]\{40\}\).*/\1/p' \
| sort -u)
if ((${#codesign_hashes[@]} == 0)); then
echo "No signing identities found in $keychain_path"
cleanup_keychain
rm -f "$cert_path"
exit 1
fi
if ((${#codesign_hashes[@]} > 1)); then
echo "Multiple signing identities found in $keychain_path:"
printf ' %s\n' "${codesign_hashes[@]}"
cleanup_keychain
rm -f "$cert_path"
exit 1
fi
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should have ONE AND ONLY cert that can be used for codesign - populated above via a temp keychain created with our Apple cert. If there is none or more than one, we terminate and cleanup.

@shijie-oai shijie-oai force-pushed the shijie/codesign-binary branch from 795ac1d to 72b1eda Compare October 8, 2025 18:53
@shijie-oai shijie-oai marked this pull request as ready for review October 8, 2025 18:55
@shijie-oai shijie-oai requested review from bolinfest and gpeal October 8, 2025 18:55
@shijie-oai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

build:
needs: tag-check
name: ${{ matrix.runner }} - ${{ matrix.target }}
name: Build - ${{ matrix.runner }} - ${{ matrix.target }}

Choose a reason for hiding this comment

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

Curious why we're only using macOS 14 and not 15? (And also not 26?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For better backward compatibility I assume - 15 should be relatively safe to bump but not sure about 26 yet. I can open a separate PR to include both 14 and 15 and making sure that nothing break and then we can drop 14.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, we have to think about what this means for things like the npm package, which is already quite large since it contains 6 native binaries.

Today, if you care about a macOS-specific build of Codex CLI, brew is probably the better way to get it (though that won't have the signing, which is an issue we're discussing).

@shijie-oai
Copy link
Collaborator Author

@codex review

Copy link
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants