Join our Newsletter — 33% off our NHI Course
Home› Guides› Apple Code Signing and Notarisation Guide: Developer ID,…
Guide Software & AI Supply Chain

Apple Code Signing and Notarisation Guide: Developer ID, Hardened Runtime and CI Keys

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 13 min read
On this page

Every Mac app distributed outside the Mac App Store depends on a Developer ID signing identity and on Apple's notary service, and the credentials behind both are some of the most valuable non-human identities a software company holds. This guide explains how Developer ID signing, the Hardened Runtime and notarisation fit together, how to automate them in continuous integration without exposing keys, and how to verify, monitor and respond when something goes wrong.

This is an independent guide from NHI Mgmt Group, based on Apple's public documentation as of November 2026. It is not sponsored or reviewed by Apple. Product features change, so confirm settings against Apple's current documentation.

Key takeaways

  • Notarisation requires a Developer ID certificate, the Hardened Runtime, a secure timestamp and no com.apple.security.get-task-allow entitlement set to true.
  • Only the Account Holder of an Apple Developer Program team can generate a Developer ID certificate, which makes custody of that key an organisational decision, not a developer convenience.
  • Notarisation is an automated scan, not App Review. It also keeps an audit trail of software signed with your key, which matters if the key is ever exposed.
  • Since 1 November 2023 the notary service accepts uploads only from notarytool, Xcode 14 or later, or the Notary API, not from altool.
  • CI pipelines hold two credentials: the signing identity and the notary service credential. Store, scope and rotate both as privileged machine identities.
  • Always read the notary log, even on success, and verify signatures, timestamps and Gatekeeper assessment before release.

How signing, notarisation and Gatekeeper fit together

Three Apple mechanisms work in sequence for software distributed directly to users.

Apple's requirement has been in force for years. Beginning in macOS 10.14.5, software signed with a new Developer ID certificate and all new or updated kernel extensions must be notarised to run, and beginning in macOS 10.15 all software built after 1 June 2019 and distributed with Developer ID must be notarised. Software distributed through the Mac App Store does not need notarisation because the store submission process includes equivalent checks.

The notary service accepts macOS apps, non-app bundles such as kernel extensions, disk images in UDIF format and flat installer packages. For the general principles of code signing across ecosystems, see our Code Signing Security Guide; this page covers only the Apple specifics.

Developer ID certificates and who controls them

Apple states that you must be the Account Holder of your development team in the Apple Developer Program to generate a Developer ID certificate, either in Xcode or in the Certificates, Identifiers and Profiles section of the developer account. Two certificate types matter for most teams, as described in Apple's notarisation troubleshooting guidance:

  • Developer ID Application for Mach-O files, disk images, bundles, apps and command line tools.
  • Developer ID Installer for installer packages.

Only Developer ID certificates can be used for notarisation. Apple lists the certificates not to use: Mac Distribution, ad hoc, Apple Developer and local development certificates, and self-signed certificates. A wrong certificate produces the log message The binary is not signed with a valid Developer ID certificate.

Governance recommendations

Because certificate creation is limited to the Account Holder, NHI Mgmt Group recommends treating the Account Holder role and the Developer ID private keys as privileged assets:

  • Assign the Account Holder role to a controlled organisational account, protected with strong multi-factor authentication and recovery procedures, rather than to an individual developer's personal account.
  • Generate Developer ID private keys in a controlled environment, keep a record of every certificate issued, its serial number, where its key lives and who can use it.
  • Keep the number of live Developer ID keys to the minimum your release process needs, and remove keys from laptops once signing moves to a build service.
  • Review the certificate list in the developer account regularly and investigate any certificate you cannot match to a known key location.

Hardened Runtime and entitlements

Apple describes the Hardened Runtime, together with System Integrity Protection, as protecting runtime integrity by preventing certain classes of exploits, like code injection, dynamically linked library (DLL) hijacking, and process memory space tampering. It is required for notarisation: without it, the notary log reports The executable does not have the hardened runtime enabled.

Enable it in Xcode under the target's Signing and Capabilities, or for manual signing add --options=runtime to the OTHER_CODE_SIGN_FLAGS build setting. Most apps run unchanged, but the Hardened Runtime disallows some less common capabilities, such as just-in-time compilation. Exceptions are granted through entitlements. Apple lists these runtime exceptions:

  • com.apple.security.cs.allow-jit
  • com.apple.security.cs.allow-unsigned-executable-memory
  • com.apple.security.cs.allow-dyld-environment-variables
  • com.apple.security.cs.disable-library-validation
  • com.apple.security.cs.disable-executable-page-protection
  • com.apple.security.cs.debugger

Apple advises using only the entitlements that are absolutely necessary. Entitlements are added only to executables; shared libraries, frameworks and in-process plug-ins inherit the entitlements of their host. macOS refuses to load system extensions that use Hardened Runtime exception entitlements, with one exception for allow-jit in non-DEXT system extensions.

Entitlement review as a security control

Each exception weakens a specific protection. NHI Mgmt Group recommends a written justification for every exception entitlement, reviewed at each major release. Pay particular attention to disable-library-validation: Apple notes that library validation protects executables from loading untrusted code, and should not be disabled for executables that do not host plug-ins. Hosts that do load plug-ins must declare all entitlements their plug-ins need, because plug-ins inherit the host's entitlements.

The get-task-allow entitlement

Xcode sets CODE_SIGN_INJECT_BASE_ENTITLEMENTS to YES for new macOS projects, which adds com.apple.security.get-task-allow to support debugging. Apple warns that this poses a security risk for a shipping app, because it can allow an attacker to inject code at runtime. The standard Xcode export strips it; custom workflows must remove it, or notarisation fails. Add an automated check to your release pipeline that inspects signed entitlements with codesign -d --entitlements :- and fails if this entitlement is present.

Secure timestamps and signature checks

Notarisation requires a secure timestamp. Xcode adds one during archive and export, but not during ordinary builds, so custom workflows should pass the timestamp option to codesign or add it to OTHER_CODE_SIGN_FLAGS. Apple states that generating a secure timestamp needs internet access and that macOS accepts only one secure timestamp server, timestamp.apple.com. Build agents must be able to reach it.

Apple documents these verification commands, which belong in every release pipeline:

  • codesign -vvv --deep --strict /path/to/bundle to verify the signature, including nested code, with the restrictiveness notarisation requires.
  • pkgutil --check-signature /path/to/file.pkg for installer packages, whose output should include "Signed with a trusted timestamp" and a Developer ID Installer entry.
  • codesign -dvv /path/to/bundle to confirm a Timestamp value is present; "Signed Time" instead indicates no secure timestamp.
  • spctl -vvv --assess --type exec /path/to/application to check whether the software will run under current system policy.
  • plutil -lint on entitlements files, which must be ASCII-encoded XML property lists without byte order marks.

Apple also notes that notarisation only works for binaries linked against the macOS 10.9 SDK or later.

Notarising in a CI pipeline

Apple's customised workflow guidance covers scripted builds. The outline is:

  1. Export the archive with xcodebuild -exportArchive and an ExportOptions.plist.
  2. Package the app, because the notary service does not accept a bare .app bundle. Apple's example uses ditto -c -k --keepParent to create a ZIP; the service also accepts UDIF disk images and signed flat installer packages, and processes nested containers.
  3. Submit with xcrun notarytool submit, using --wait so the tool returns only when processing finishes, and optionally --webhook to have the service call a URL afterwards.
  4. Download and archive the JSON log with xcrun notarytool log <id>.
  5. Staple the ticket with xcrun stapler staple.

Apple states that notarisation completes for most software within 5 minutes and for 98 percent within 15 minutes, and asks developers to limit notarizations to 75 per day. Keep large non-executable data out of signed code directories to avoid slow processing.

Credentials for the notary service

Apple's command line example supplies an Apple ID, team ID and an app-specific password, which is required because App Store Connect enforces two-factor authentication. To avoid placing the password as cleartext in a script, notarytool store-credentials saves it as a keychain item referenced by --keychain-profile. Apple also offers the Notary API for teams that want to avoid a dependency on Xcode.

NHI Mgmt Group recommends these controls for the notary credential:

  • Use a dedicated account or API credential for the build system, never a developer's personal Apple ID and password.
  • Store the credential in your secrets manager and load it into an ephemeral keychain for the job only, deleting the keychain at the end.
  • Restrict which pipelines and branches can read it, so a pull request from a fork cannot trigger notarisation.
  • Rotate app-specific passwords and API keys on a schedule and immediately when anyone with access leaves.

Protecting the Developer ID key in CI

The signing key is the higher-value credential. A stolen Developer ID key lets an attacker produce software that Gatekeeper attributes to you. Recommended practice:

  • Run signing on dedicated, hardened macOS build agents, not on shared runners used for untrusted code.
  • Import the signing identity into a temporary keychain for each job, protected by a random password, and destroy it afterwards.
  • Separate build from sign: build in one job, then pass only reviewed artefacts from protected branches to a signing job with access to the key.
  • Log every signing operation with the commit, pipeline run and artefact hash, and alert on signing outside release windows.

Our CI/CD Pipeline Compromise Playbook covers response if the build system itself is compromised.

Stapling, network access and offline users

After notarisation, Gatekeeper on macOS 10.14 or later finds the ticket online the next time a user runs the app, including users who downloaded it before notarisation. Stapling attaches the ticket so Gatekeeper can find it without a network connection. You can staple to apps, bundles, disk images and flat installer packages. You cannot staple to a ZIP directly; staple each item, then create a new ZIP. Standalone binaries receive tickets but cannot currently be stapled.

For custom installers, Apple requires two rounds: notarise and staple the payload, then package and notarise the installer. Network installers need the installer and the items it downloads notarised separately.

Build agents need outbound access to the notary upload endpoint (by default an Amazon S3 Transfer Acceleration host, or a regional S3 host with the no-s3-acceleration flag), to Apple's CloudKit address ranges on port 443 for stapling, and to timestamp.apple.com. Allow these explicitly in egress rules rather than giving signing agents open internet access.

When a Developer ID key is exposed

Apple notes that notarisation also protects your users if your Developer ID signing key is exposed: the notary service maintains an audit trail of software distributed using your signing key, and if you discover unauthorised versions you can work with Apple to revoke the tickets associated with them. Apple also recommends notarising all previously distributed software, so the service can distinguish your legitimate builds from tampered variants.

A response plan should cover:

  1. Containment: remove the key from every location, disable the affected pipeline and rotate the notary credential.
  2. Scoping: compare your signing logs with the notary history to find builds you did not produce.
  3. Apple engagement: contact Apple about revoking tickets for unauthorised builds and about the certificate.
  4. Reissue: generate a new Developer ID certificate under the Account Holder, re-sign and notarise current releases, and update download channels.
  5. Communication: tell customers which versions are legitimate and how to verify them.

Our Compromised Code Signing Certificate Playbook gives a fuller incident workflow.

Framework mapping

Developer ID signing and notarisation support NIST SP 800-53 controls CM-14 Signed Components and SI-7 Software, Firmware, and Information Integrity, with key custody under SC-12 Cryptographic Key Establishment and Management. On the threat side, MITRE ATT&CK tracks adversaries obtaining code signing certificates (T1588.003 Code Signing Certificates), abusing signatures (T1553.002 Code Signing) and stealing private keys (T1552.004 Private Keys). The NIST Secure Software Development Framework covers protecting release integrity more broadly.

Common failure patterns

  • Developer ID keys on laptops. Signing identities exported to individual machines and never retired.
  • Account Holder as a personal account. Certificate creation depends on one person and their account security.
  • Personal Apple ID in CI. A developer's Apple ID and app-specific password stored as a pipeline variable.
  • get-task-allow in release builds. Custom signing scripts leave the debugging entitlement in shipped software.
  • Broad runtime exceptions. Library validation disabled in apps that do not host plug-ins.
  • Logs ignored on success. Warnings in the notary log are never read until a later submission fails.
  • Unstapled distributions. Offline users or restricted networks cannot verify the ticket.
  • Signing on shared runners. The key is reachable from jobs that build untrusted pull requests.

Practitioner checklist

  • Record every Developer ID certificate, its key location and the people and pipelines that can use it.
  • Place the Account Holder role on a controlled organisational account with strong MFA.
  • Enable the Hardened Runtime and justify every exception entitlement in writing.
  • Fail release builds that contain com.apple.security.get-task-allow.
  • Include a secure timestamp and verify it with codesign -dvv.
  • Use notarytool with a dedicated, stored credential rather than cleartext passwords.
  • Sign only on dedicated agents with ephemeral keychains and separate build and sign jobs.
  • Archive notary logs for every submission and review warnings.
  • Staple tickets to every stapleable deliverable and run spctl assessment before release.
  • Notarise previously shipped versions and keep a tested key compromise plan.

Standards and references

Related NHI Mgmt Group resources: Code Signing Security Guide · Apple Platform Security Explained · Compromised Code Signing Certificate Playbook · CI/CD Pipeline Compromise Playbook

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.