Track signing assets by project
Keep certificates, private keys, and build logs separate
Certificates can be copied, but that doesn't mean every build task should be able to access them. Treat signing materials as separate assets: decide who imports them, which keychain they're used in, and when they'll be revoked or rotated.
Certificates and provisioning profiles
Store certificates, their corresponding private keys, and provisioning profiles by project. Before importing, check the purpose, expiry date, and target. Never commit an export containing a private key to a code repository.
If you need a backup, use a password-protected export and share its password through a separate channel. Keep backup copies somewhere managed by your team—not only on the build machine.
A dedicated build keychain
Consider keeping CI signing identities in a dedicated keychain, separate from those used for day-to-day work. Configure unlock and access permissions for the build's actual needs; don't give every process access to private keys just for convenience.
If an automated task needs to unlock the keychain, read the password from a protected CI variable. Verify signing with a controlled build before expanding the runner's scope.
Limit access to logs and artifacts
Don't print passwords, tokens, or signing export passwords in scripts. When troubleshooting, disable verbose command output for sensitive steps and check logs for credentials before uploading them.
Set storage locations and retention rules for archives, export packages, and debug symbols separately. A completed build doesn't mean your assets are backed up. Verify that you can retrieve the required artifacts from team storage at least once.
Verify the signing identity before triggering a release build
Run this read-only check as the target build user to confirm that the expected code-signing identity is in the keychain. Use the output for local verification; don't paste your full environment details into a public record.
security find-identity -v -p codesigning
This command only lists identities. It won't import certificates or configure keychain access for you.