Code signing is often the most sensitive part of a remote iOS build. The Mac may need a distribution certificate, a provisioning profile and permission to upload a build, but an ordinary test job does not need all of them.

Use this checklist to reduce unnecessary exposure.

1. Separate tests from releases

Run compilation and simulator tests without distribution credentials whenever the project allows it. Put archiving, signing and upload steps in a dedicated release workflow.

2. Limit who can start a release

Restrict release workflows to protected branches or tags. Add an approval step for production environments, especially when several people can modify workflow files.

3. Minimize token permissions

Give the workflow and its GitHub token only the permissions required for the job. Avoid broad write access when a job only needs to read source code and upload an artifact.

4. Keep secrets out of the repository

Never commit certificates, private keys, passwords or App Store Connect credentials. Store secrets in the approved secret system and expose them only to the release job that needs them.

5. Protect the keychain

Use a dedicated build keychain where practical. Unlock it only for the signing stage, then remove temporary credentials or lock the keychain when the job finishes. Do not leave an interactive session signed in with more access than the workflow requires.

6. Control the runner

A persistent self-hosted runner is not automatically reset between jobs. Allow only trusted private repositories and trusted workflow triggers to use a signing machine. GitHub warns that untrusted workflow code can persist on a self-hosted runner or access sensitive information on it.

7. Make expiry visible

Track the expiry dates of certificates and provisioning profiles. Test the release workflow before a deadline so renewal does not become an emergency.

The safest design gives each job the least authority it needs. Pull-request tests should prove that code works. A release job should sign only reviewed code, under controlled conditions, with credentials that can be rotated.

A remote Mac can make iOS releases convenient and repeatable. It should also make the trust boundary clearer—not turn the machine into a permanent store of powerful credentials.