feat(release): notarize PwrAgent macOS binaries - #15
Open
Harold Hunt (huntharo) wants to merge 1 commit into
Open
feat(release): notarize PwrAgent macOS binaries#15Harold Hunt (huntharo) wants to merge 1 commit into
Harold Hunt (huntharo) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xcrun notarytool submit --waitand require anAcceptedresult; continue publishing the existing PwrAgent-compatible.tar.gzassetsMotivation
The currently installed managed
codex-app-serverassesses asUnnotarized Developer ID. PwrAgent launches these provenance-marked binaries frequently, which drives repeated Gatekeeper andsyspolicydwork. This change adds notarization to the production managed-runtime path without touching the separateturn_start_zsh_forktest-copy work.Security and release properties
macos-signjob preserves the existing hardened-runtime, secure-timestamp, Team ID, and Code Mode JIT-entitlement checks.codex,codex-app-server, andcodex-code-mode-hostbytes before the temporary notarization ZIP is created.notarytoolwaits up to 45 minutes and the job fails closed unless the final JSON status is exactlyAcceptedwith a submission ID.codesignand assessed by Gatekeeper withspctl, requiringsource=Notarized Developer IDwith bounded ticket-propagation retries.Apple supports ZIP as a notarization submission container, but ZIP and tar archives cannot be stapled. A raw standalone Mach-O cannot be stapled either;
staplersupports UDIF disk images, code-signed executable bundles, and signed flat installer packages. These unchanged standalone binaries therefore rely on Gatekeeper online ticket retrieval. See Apple custom notarization workflow.Required GitHub Environment secrets
Configure these additional secrets on the protected
apple-signingenvironment:APPLE_NOTARY_KEY: base64-encoded App Store Connect Team API.p8private keyAPPLE_NOTARY_KEY_ID: Team API Key IDAPPLE_NOTARY_ISSUER_ID: Team API Issuer IDThe existing
CSC_LINKandCSC_KEY_PASSWORDremain required. The runbook now documents environment protection and the fact that the existing 1Password certificate helper does not load notarization credentials.Verification
bash -n scripts/pwragent-release/notarize-macos-binaries.shshellcheck scripts/pwragent-release/notarize-macos-binaries.shpython3 scripts/pwragent-release/check-release-signing.pypython3 scripts/pwragent-release/test_generate_update_manifest.pyactionlint .github/workflows/pwragent-release.yml .github/workflows/pwragent-release-check.ymljust fmtThe live Apple submission is intentionally not part of ordinary CI. Apply
ci:release-signingafter the environment secrets are configured to exercise the protected end-to-end path.