Repository Public
1<!--2ORIX Docs3File: docs/release/signing.md4Description: How the Release build is signed: project settings, the release script step by step, entitlements, and what was observed on the 1.0.0 build.5Author: Simon-Pierre Boucher6Contact: contact@spboucher.ai7-->8# Code signing910Sources: [`project.yml`](../../project.yml), [`Scripts/release.sh`](../../Scripts/release.sh), [`App/Resources/ORIXDocs.entitlements`](../../App/Resources/ORIXDocs.entitlements). Background and Apple's requirements: [technology-evaluation.md, section 12](../research/technology-evaluation.md#12-distribution).1112## Settings in the project1314| Setting (`project.yml`) | Value | Effect |15|---|---|---|16| `DEVELOPMENT_TEAM` | `3YM54G49SN` | Team of the signing identity |17| `ENABLE_HARDENED_RUNTIME` | `YES` | Hardened runtime in every configuration |18| Debug: `CODE_SIGN_STYLE` | `Automatic` | Local development signing |19| Release: `CODE_SIGN_STYLE` | `Manual` | No automatic provisioning |20| Release: `CODE_SIGN_IDENTITY` | `Developer ID Application` | Distribution outside the Mac App Store |21| Release: `CODE_SIGN_INJECT_BASE_ENTITLEMENTS` | `NO` | Xcode does not add `get-task-allow` |22| Release: `OTHER_CODE_SIGN_FLAGS` | `--timestamp` | Secure timestamp, required for notarization |23| `CODE_SIGN_ENTITLEMENTS` | `App/Resources/ORIXDocs.entitlements` | See below |24| `PRODUCT_BUNDLE_IDENTIFIER` | `ai.spboucher.orix.docs` | |2526## Entitlements2728`App/Resources/ORIXDocs.entitlements` is an empty dictionary:2930```xml31<plist version="1.0">32<dict/>33</plist>34```3536Consequences:3738* **No hardened-runtime exception** is requested: no JIT, no unsigned executable memory, no DYLD environment variables, no disabled library validation, no debugger access.39* **No App Sandbox.** The application is not sandboxed; what that means for security is described in [security.md](../security.md#the-process).40* **No network entitlement** is needed or requested (they only exist for sandboxed apps); the application contains no network code.41* No Apple-events automation entitlement: the app does not control other applications (`NSAppleEventsUsageDescription` in `project.yml` says so).4243## What `Scripts/release.sh` does44451. Finds the first `Developer ID Application` identity in the keychain (`security find-identity -v -p codesigning`) and stops if there is none. The script does not create or import identities.462. Runs `xcodegen generate`, then `xcodebuild … -configuration Release build` into `build/DerivedData`. Xcode signs the application with the settings above.473. Copies the product to `dist/ORIX Docs.app` with `ditto` (after emptying `dist/`).484. Builds the command-line tool as a universal binary (`swift build -c release --product orixdocs --arch arm64 --arch x86_64`) and copies it to `Contents/Helpers/orixdocs`, with the SwiftPM resource bundle it needs (the math fonts) next to it.495. Signs inside-out:50 * each resource bundle in `Contents/Helpers`: `codesign --force --timestamp --sign <identity>`;51 * the tool: `codesign --force --timestamp --options runtime --identifier ai.spboucher.orix.docs.cli --sign <identity>`;52 * the application again, because its content changed: `codesign --force --timestamp --options runtime --entitlements App/Resources/ORIXDocs.entitlements --sign <identity>`.536. Verifies: `codesign --verify --deep --strict --verbose=2`, prints the architectures (`lipo -archs`), the signature fields and flags, **fails if `get-task-allow` is present**, and prints the version and build read from the bundle's `Info.plist`.547. Ends with `RESULT: … is built and signed. It is NOT notarized yet (run Scripts/notarize.sh).`5556Nothing is uploaded by this script.5758## The disk image5960The disk image is signed by [`Scripts/notarize.sh`](../../Scripts/notarize.sh), with the identity read back from the application's own signature: `codesign --force --timestamp --sign <identity> <dmg>` ([notarization.md](notarization.md)).6162## Observed on version 1.0.0 (build 2)6364Recorded in `dist/release.json` (the `dist/` folder is not committed):6566| Field | Value |67|---|---|68| `signing` | `Developer ID Application: Simon-Pierre Boucher (3YM54G49SN)` |69| `architectures` | `x86_64`, `arm64` |70| `version` / `build` | `1.0.0` / `1` |71| `minimumSystemVersion` | `15.0` |7273Read from `dist/ORIX Docs.app` with `codesign -dvv` and `codesign -d --entitlements -` on 2026-11-21, when this document was written:7475| Field | Value |76|---|---|77| Identifier | `ai.spboucher.orix.docs` |78| Authority chain | Developer ID Application: Simon-Pierre Boucher (3YM54G49SN) → Developer ID Certification Authority → Apple Root CA |79| TeamIdentifier | `3YM54G49SN` |80| Flags | `0x10000(runtime)` — hardened runtime |81| Timestamp | Nov 21, 2026 at 3:15:24 AM (secure timestamp present) |82| Entitlements | empty dictionary |83| `Contents/Helpers` | `orixdocs`, `SwiftMath_SwiftMath.bundle` |8485These observations are not stored in a committed report; `Scripts/release.sh` prints the same fields at each run.8687## Credentials8889The private key of the Developer ID certificate stays in the maintainer's keychain. `.gitignore` excludes `*.p12`, `*.p8`, `*.cer`, `*.pem`, provisioning profiles, keychains, `.env` files and `notary*.json`, so that no credential can be committed by accident.9091## What is not covered9293* The Intel slice is built and signed but was never executed ([distribution.md](distribution.md#what-was-not-verified)).94* The signature was not checked on a second Mac.95* The application is not sandboxed; adopting the sandbox for the GUI application, with the command-line tool left unsandboxed, was recommended by the technology evaluation and is on the [roadmap](../../README.md#roadmap).96