Code signing
Sources: project.yml, Scripts/release.sh, App/Resources/ORIXDocs.entitlements. Background and Apple's requirements: technology-evaluation.md, section 12.
Settings in the project
Setting (project.yml) |
Value | Effect |
|---|---|---|
DEVELOPMENT_TEAM |
3YM54G49SN |
Team of the signing identity |
ENABLE_HARDENED_RUNTIME |
YES |
Hardened runtime in every configuration |
Debug: CODE_SIGN_STYLE |
Automatic |
Local development signing |
Release: CODE_SIGN_STYLE |
Manual |
No automatic provisioning |
Release: CODE_SIGN_IDENTITY |
Developer ID Application |
Distribution outside the Mac App Store |
Release: CODE_SIGN_INJECT_BASE_ENTITLEMENTS |
NO |
Xcode does not add get-task-allow |
Release: OTHER_CODE_SIGN_FLAGS |
--timestamp |
Secure timestamp, required for notarization |
CODE_SIGN_ENTITLEMENTS |
App/Resources/ORIXDocs.entitlements |
See below |
PRODUCT_BUNDLE_IDENTIFIER |
ai.spboucher.orix.docs |
Entitlements
App/Resources/ORIXDocs.entitlements is an empty dictionary:
<plist version="1.0">
<dict/>
</plist>Consequences:
- No hardened-runtime exception is requested: no JIT, no unsigned executable memory, no DYLD environment variables, no disabled library validation, no debugger access.
- No App Sandbox. The application is not sandboxed; what that means for security is described in security.md.
- No network entitlement is needed or requested (they only exist for sandboxed apps); the application contains no network code.
- No Apple-events automation entitlement: the app does not control other applications (
NSAppleEventsUsageDescriptioninproject.ymlsays so).
What Scripts/release.sh does
- Finds the first
Developer ID Applicationidentity in the keychain (security find-identity -v -p codesigning) and stops if there is none. The script does not create or import identities. - Runs
xcodegen generate, thenxcodebuild … -configuration Release buildintobuild/DerivedData. Xcode signs the application with the settings above. - Copies the product to
dist/ORIX Docs.appwithditto(after emptyingdist/). - Builds the command-line tool as a universal binary (
swift build -c release --product orixdocs --arch arm64 --arch x86_64) and copies it toContents/Helpers/orixdocs, with the SwiftPM resource bundle it needs (the math fonts) next to it. - Signs inside-out:
- each resource bundle in
Contents/Helpers:codesign --force --timestamp --sign <identity>; - the tool:
codesign --force --timestamp --options runtime --identifier ai.spboucher.orix.docs.cli --sign <identity>; - the application again, because its content changed:
codesign --force --timestamp --options runtime --entitlements App/Resources/ORIXDocs.entitlements --sign <identity>.
- each resource bundle in
- Verifies:
codesign --verify --deep --strict --verbose=2, prints the architectures (lipo -archs), the signature fields and flags, fails ifget-task-allowis present, and prints the version and build read from the bundle'sInfo.plist. - Ends with
RESULT: … is built and signed. It is NOT notarized yet (run Scripts/notarize.sh).
Nothing is uploaded by this script.
The disk image
The disk image is signed by Scripts/notarize.sh, with the identity read back from the application's own signature: codesign --force --timestamp --sign <identity> <dmg> (notarization.md).
Observed on version 1.0.0 (build 2)
Recorded in dist/release.json (the dist/ folder is not committed):
| Field | Value |
|---|---|
signing |
Developer ID Application: Simon-Pierre Boucher (3YM54G49SN) |
architectures |
x86_64, arm64 |
version / build |
1.0.0 / 1 |
minimumSystemVersion |
15.0 |
Read from dist/ORIX Docs.app with codesign -dvv and codesign -d --entitlements - on 2026-11-21, when this document was written:
| Field | Value |
|---|---|
| Identifier | ai.spboucher.orix.docs |
| Authority chain | Developer ID Application: Simon-Pierre Boucher (3YM54G49SN) → Developer ID Certification Authority → Apple Root CA |
| TeamIdentifier | 3YM54G49SN |
| Flags | 0x10000(runtime) — hardened runtime |
| Timestamp | Nov 21, 2026 at 3:15:24 AM (secure timestamp present) |
| Entitlements | empty dictionary |
Contents/Helpers |
orixdocs, SwiftMath_SwiftMath.bundle |
These observations are not stored in a committed report; Scripts/release.sh prints the same fields at each run.
Credentials
The 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.
What is not covered
- The Intel slice is built and signed but was never executed (distribution.md).
- The signature was not checked on a second Mac.
- 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.