03
Stage two: isolate Developer ID signing from orchestration
Notarization does not replace Developer ID signing. The product must be signed before it is submitted, and nested executable code can introduce failures even when the outer application appears correctly signed.
The signing stage should verify at least four things:
- The expected signing identity is available to the job.
- Nested code is signed with the intended identity.
- Entitlements and hardened runtime settings match the product design.
- The signing command runs under the intended execution account.
Use placeholders for sensitive values in logs:
<TEAM_ID>
<SIGNING_IDENTITY>
<KEYCHAIN_PROFILE>
<SUBMISSION_ID>
<ARTIFACT_PATH>
Never print private key material, certificate contents, authentication profiles, or complete credential configuration in a public CI log. A successful build job is not permission to expose the signing environment to every runner.
A dedicated remote Mac offers the cleanest boundary when signing is a frequent operation. The machine can hold a restricted keychain, run the Apple command-line tools, and accept jobs only from the CI controller. A shared Mac can work, but it requires stronger workspace cleanup, account isolation, queue control, and post-job keychain checks. An external signing step may reduce direct credential exposure on the build node, but it adds an artifact transfer boundary and another failure domain.
The acceptance evidence should include:
- The signing verification result for the outer application.
- The result for important nested executables.
- The execution account used by the job.
- The keychain access state before and after the job.
- The exact artifact digest before signing and after packaging.
- A failed-signing test that proves the pipeline stops before submission.
A common design error is to let the Linux controller own the entire release secret set. In a mixed design, the controller should know how to request a job and collect a result. The Mac worker should be the only place where the signing operation and its protected keychain are available.
For teams building a repeatable remote Mac development environment, the same separation matters outside CI: interactive troubleshooting access should not automatically grant release credentials, and release jobs should not depend on an engineer’s personal login session.