Join our Newsletter — 33% off our NHI Course

macOS Code Signing

macOS Code Signing is Apple’s integrity check that binds an app or executable to a signing identity and verifies it before execution or use. Attackers may sign malware with stolen or abused certificates, or tamper with unsigned code to evade trust checks. Defenders validate signing status, certificate reputation, and unexpected signature changes.

What macOS Code Signing Does

macOS code signing is Apple’s integrity check for software, binding an app or executable to a signing identity and verifying that relationship before the code runs or is trusted by the platform.

It matters because the signature is not just a label, it is part of the trust decision. If the signature is missing, altered, or no longer trusted, macOS may treat the software differently even when the binary otherwise appears intact.

In practical terms, code signing helps answer a basic question: is this the software the signer intended to ship, or has it been changed since it was signed?

Why Code Signing Is Trusted, and How It Fails

Code signing works because Apple and the local system can check that a valid certificate and signing chain were used, and that the code has not been modified since signing. That creates a trust boundary around software distribution, launch behaviour, and updates.

The weak point is not the cryptography itself, but the signing identity and the private material behind it. If an attacker steals a signing certificate or signing key, they can produce software that looks legitimate to trust checks. If defenders validate only the presence of a signature and not whether it is expected, current, and associated with the right publisher, malicious code can still slip through.

It also fails when organisations assume signing alone equals safety. A signed binary can still be unwanted, abused, or trojanised if the signing process, release pipeline, or certificate lifecycle is compromised.

To understand the surrounding trust model, readers should also look at Apple’s own platform guidance and a broader Code Signing Security Guide that covers signing pipelines, timestamping, revocation, and key theft response.

What Organisations Should Verify

Exposure checks usually start with software inventory, because teams need to know which macOS apps, launch agents, installers, and developer build outputs rely on signing for trust decisions. That inventory should include internally built software as well as third-party apps that users install outside managed channels.

Defenders should also review whether the organisation depends on certificates or keys that are stored too broadly, reused across systems, or protected by weak operational controls. The same trust model that protects software distribution can become a single point of failure if the signing identity is easy to abuse.

For teams that manage their own build and release tooling, certificate lifecycle discipline is part of the exposure picture. A useful reference point is the Machine Identity, PKI and Certificate Lifecycle Guide, because code signing depends on the same broader certificate governance problem: issuance, storage, renewal, and revocation.

Where compromise is suspected, the most important question is not only whether a certificate was revoked, but whether any software already distributed with that trust chain remains in circulation or on endpoints.

Practical Defences and Review After Compromise

If a signing key, certificate, or signing pipeline is abused, remediation is broader than replacing one file. Teams usually need to rotate the signing material, revoke the certificate where appropriate, reissue trusted releases, and review whether malicious binaries were distributed before the trust change took effect.

Post-incident review should include download sources, build logs, release automation, code review gates, and endpoint telemetry. The goal is to determine whether the attacker signed malicious code directly, tampered with a legitimate build, or used stolen trust to disguise a payload that would otherwise have been blocked.

One useful comparison is the pattern seen in incidents where code signing material was exposed or abused and the affected organisation had to revoke trust, rotate keys, and republish releases. The NVIDIA code-signing certificates stolen 2022 and AnyDesk breach 2024 resources illustrate why stolen signing material is operationally serious, even when the signed software itself is not immediately visible as malicious.

For software supply chains, the related lesson is that trusted signing can be turned against defenders when build or release trust is compromised, as shown in the SolarWinds supply chain compromise case.

The Cryptographic Key Management Guide is also relevant here because code signing keys should be treated as high-value signing material with tight inventory, access control, and recovery procedures.

Risk and Threat Considerations

Code signing creates a high-trust target: if attackers obtain signing keys or abuse a legitimate signing workflow, they can distribute malware that appears authentic to operating-system trust checks and to users who rely on publisher reputation. That makes signing infrastructure, certificate storage, and release automation attractive compromise points.

Failure mechanism: The trust check fails when the attacker controls the signing identity, the private key, or the release path that produces apparently legitimate signed code. Unsigned tampering, certificate theft, and abused build pipelines all turn the integrity signal into an attacker advantage.

Impact: A compromised signing trust chain can enable malware delivery, persistence through trusted software updates, faster spread inside managed environments, and loss of confidence in the publisher’s releases until keys are revoked and software is revalidated.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-57, CIS Controls v8, NIST SP 800-53 Rev 5 and SLSA set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST SP 800-57 3 — Key Management Framework Code signing depends on signing-key lifecycle, protection, rotation and revocation discipline.
Recommendation — Protect signing keys, enforce lifecycle controls, and revoke compromised material immediately.
CIS Controls v8 5 — Account Management Certificate and release-system access must be tightly controlled to prevent signing abuse.
Recommendation — Restrict access to signing systems and remove unnecessary signing privileges.
NIST SP 800-53 Rev 5 IA-5 — Authenticator Management Signing certificates and private keys function as authenticators that must be issued, protected and changed safely.
SC-12 — Cryptographic Key Establishment and Management The term depends on protecting and managing cryptographic signing material.
Recommendation — Manage signing authenticators through controlled issuance, storage, rotation and revocation. Apply strong key-management controls to protect signing keys throughout their lifecycle.
SLSA Build provenance and integrity Trusted releases depend on build provenance and integrity, which code signing is meant to reinforce.
Recommendation — Tie code signing to reproducible, attestable build provenance and release integrity checks.

Practitioner Guidance

Why practitioners should care: macOS code signing is only as strong as the control around the signing identity, so the signing key and release process deserve the same protection as any other high-value production trust asset. Treat unexpected signature changes, expired trust relationships, and unusual signing events as signals for review, not as routine admin noise.

Practitioner takeaway: The best defence is not just signing code, but proving that only the right pipeline can sign it, and that compromise can be detected before trusted software reaches endpoints.