SPB Git

Repository Public

signing.md 10.3 KB

# Code signing

This page describes how the release build of ORIX DJ is signed, as implemented by project.yml and Scripts/sign.sh. The signing run for version 1.0.0 has not happened yet: the procedure below is what the scripts do, and the places where real output will be recorded are marked with result placeholders.

Related pages: notarization, distribution, release checklist, development setup, security report.

# Summary

Item Value Where it is defined
Distribution channel Developer ID, outside the Mac App Store project.yml (Release), scripts
Identity Developer ID Application: Simon-Pierre Boucher (3YM54G49SN) (present in the keychain of the build machine) selected by CODE_SIGN_IDENTITY: "Developer ID Application" and DEVELOPMENT_TEAM: 3YM54G49SN
Signing style Manual in Release (CODE_SIGN_STYLE: Manual), automatic in Debug project.yml
Hardened Runtime Enabled (ENABLE_HARDENED_RUNTIME: YES, project-wide) project.yml
Secure timestamp OTHER_CODE_SIGN_FLAGS: "--timestamp" project.yml (Release)
Entitlements None. No .entitlements file exists and no CODE_SIGN_ENTITLEMENTS is set repository
Base entitlements injection Off (CODE_SIGN_INJECT_BASE_ENTITLEMENTS: NO), so no get-task-allow project.yml (Release)
App Sandbox Not enabled follows from the absence of entitlements
Architectures arm64 only (ARCHS: arm64) project.yml (Release)
Bundle identifier ai.spboucher.orix.dj project.yml
Version / build MARKETING_VERSION 1.0.0 / CURRENT_PROJECT_VERSION 1 project.yml

# Who signs what

Signing of the application is done by Xcode during the Release build, not by a separate codesign call on the app. Scripts/sign.sh runs xcodebuild with the Release configuration; Xcode signs the bundle with the identity matching "Developer ID Application" for team 3YM54G49SN, with the Hardened Runtime flag (from ENABLE_HARDENED_RUNTIME) and a secure timestamp (from OTHER_CODE_SIGN_FLAGS).

The only explicit codesign --sign call in the repository is in Scripts/package.sh, for the disk image:

sh
codesign --force --timestamp --sign "$IDENTITY" "$DMG"

$IDENTITY is not hard-coded there: it is read back from the signed app (codesign -dvv on dist/ORIX DJ.app, first Authority=Developer ID Application: ... line), so the disk image is always signed with the same identity as the application it contains. See distribution.

The ZIP archive is not signed itself (a ZIP cannot carry a signature); it contains the signed, stapled application.

# Entitlements and Hardened Runtime exceptions

There is no entitlements file. Consequences, all visible in the repository:

  • No App Sandbox. The app reads audio files anywhere the user points it to, and keeps its library in ~/Library/Application Support/ORIX DJ/ in the real user Library, not in a container (see persistence).
  • No Hardened Runtime exception is requested: no com.apple.security.cs.allow-jit, allow-unsigned-executable-memory, disable-library-validation or allow-dyld-environment-variables. The app loads no third-party dynamic library; the engine package declares a plain library product (no dynamic type: in Package.swift), and Scripts/sign.sh lists any nested *.dylib, *.framework or *.bundle it finds so that an unexpected one would be noticed.
  • No device entitlement (com.apple.security.device.audio-input and similar). The app declares no audio input and has no usage-description key in its Info.plist. Audio output and CoreMIDI need no entitlement outside the sandbox.
  • No network entitlement is needed outside the sandbox. Outgoing HTTPS to the Anthropic API is the only network use, and Scripts/check.sh enforces that network APIs appear only in the Anthropic client and its two UI folders.

Whether the absence of exceptions holds at run time under the Hardened Runtime (for example Metal shader compilation and AVFoundation decoding in the signed Release build) has not been verified yet, because no signed Release build has been launched. It is a gate in the checklist.

# Scripts/sign.sh step by step

The script runs from the repository root with set -euo pipefail. It uploads nothing.

Step Command (abridged) Failure behaviour
1. Identity present security find-identity -v -p codesigning piped to grep -q "Developer ID Application" exits 1 with "no Developer ID Application identity in the keychain"
2. String catalog /usr/bin/python3 Scripts/localize.py rebuilds App/Resources/Localizable.xcstrings from the latest build's extracted strings; keeps an existing catalog if no build data exists; exits non-zero if neither exists
3. Project xcodegen generate --quiet
4. Clean product rm -rf build/DerivedDataRelease/Build/Products/Release/ORIX DJ.app
5. Release build xcodebuild -project ORIXDJ.xcodeproj -scheme ORIXDJ -configuration Release -derivedDataPath build/DerivedDataRelease -destination 'platform=macOS,arch=arm64' build, output reduced to error: and ** BUILD lines a failed build stops the script (pipefail); a missing product prints "Release build failed"
6. Copy rm -rf dist && mkdir -p dist, then ditto of the product to dist/ORIX DJ.app note that the whole dist/ directory is erased first
7. Verify signature codesign --verify --deep --strict --verbose=2 "dist/ORIX DJ.app" non-zero status stops the script
8. Architectures lipo -archs on Contents/MacOS/ORIX DJ printed
9. Signature details codesign -dvv, keeping Identifier, Authority, TeamIdentifier, Timestamp, Runtime Version printed
10. Hardened Runtime flags from codesign -dv; must contain runtime exits 1 with "Hardened Runtime is not enabled"
11. No debug entitlement codesign -d --entitlements - --xml; must not contain get-task-allow exits 1 with "get-task-allow present"
12. Entitlements dump the same output converted to JSON with plutil, or {} printed
13. Nested code find for *.dylib, *.framework, *.bundle up to depth 4 printed (first 20)
14. Icon Contents/Resources/AppIcon.icns must exist exits 1 with "the app has no icon"
15. Offline documentation Contents/Resources/orix-script/manifest.json must exist exits 1 with "the offline documentation is not in the bundle"
16. Version CFBundleShortVersionString and CFBundleVersion read with PlistBuddy printed

The last line states the result precisely: RESULT: dist/ORIX DJ.app is built and signed. It is NOT notarized yet (Scripts/notarize.sh).

Step 2 has a side effect worth knowing: localize.py writes into the source tree (App/Resources/Localizable.xcstrings) before the Release build. At the time of writing neither that catalog nor Scripts/translations-fr-CA.json exists in the repository, so the first release run will create a catalog without French values from whatever Debug or Release build data is present, or stop if there is none. This should be resolved before the release; it is listed in the checklist.

# What a correct result looks like

The script itself only enforces steps 1, 5, 7, 10, 11, 14 and 15. The printed details must be read by a person and compared with the expected values:

Field Expected
Identifier ai.spboucher.orix.dj
Authority (first line) Developer ID Application: Simon-Pierre Boucher (3YM54G49SN)
Authority chain Developer ID Certification Authority, Apple Root CA
TeamIdentifier 3YM54G49SN
Timestamp a date (a secure timestamp is present); absence means the build was not timestamped and notarization will refuse it
flags contains runtime
architectures arm64
entitlements {}
nested code none expected

Recorded output of the release run:

Release run of 2026-11-21 (outputs re-captured the same day on the stapled bundle; the certificate holder name and team identifier are omitted here).

text
codesign --verify --deep --strict --verbose=2 "dist/ORIX DJ.app"
text
dist/ORIX DJ.app: valid on disk
dist/ORIX DJ.app: satisfies its Designated Requirement
text
Identifier / Authority / TeamIdentifier / Timestamp / Runtime Version / flags / architectures / entitlements / version
text
Identifier=ai.spboucher.orix.dj
Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20500 size=42016 flags=0x10000(runtime) hashes=1306+3 location=embedded
Authority=Developer ID Application: (owner) (TEAMID)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Nov 21, 2026 at 12:00:16 PM
TeamIdentifier=(owner team, omitted)
Runtime Version=27.2.0

arm64
entitlements: none ({})
version 1.0.0 (1)

# Verifying by hand

The same checks can be repeated at any time on dist/ORIX DJ.app or on a copy installed from the disk image:

sh
codesign --verify --deep --strict --verbose=2 "dist/ORIX DJ.app"
codesign -dvv "dist/ORIX DJ.app"
codesign -d --entitlements - --xml "dist/ORIX DJ.app"
lipo -archs "dist/ORIX DJ.app/Contents/MacOS/ORIX DJ"

A Gatekeeper assessment (spctl --assess) is only meaningful after notarization; before it, the expected answer for a Developer ID build is a rejection for lack of a notarization ticket. Scripts/finalize.sh runs the assessment at the right moment; see notarization and distribution.

# Credentials

  • The Developer ID private key stays in the login keychain of the build machine. No script exports, creates or prints a certificate or key.
  • .gitignore excludes *.p12, *.p8, *.cer, provisioning profiles, keychains, .env*, asc.env, notary*.json and AuthKey_*; Scripts/check.sh fails if such a file, a private-key block or a key-shaped string is visible to git.
  • The UI-test bundle is signed separately with automatic signing and an "Apple Development" identity (project.yml); it is never part of a release artifact.

# Debug builds

Debug builds (Scripts/build.sh debug or app) use automatic signing with the same team and also have the Hardened Runtime enabled, since ENABLE_HARDENED_RUNTIME is set at project level. They are not suitable for distribution and are not checked by sign.sh.

Files main
Menu

Theme