Signing

The default CI builds are unsigned and free: they run on your own Mac after the steps below. Signing + notarization is only needed for clean distribution to other people, and requires a paid Apple Developer account.

Install an unsigned build (no Apple Developer account)

Build it on the Mac that will run it — locally built apps are not quarantined, so Gatekeeper does not complain at all:

git clone https://github.com/wzul/dbdesk-app
cd dbdesk-app
make install          # Node, Python deps
make bundle           # Python + Rust toolchain required
open "src-tauri/target/release/bundle/macos/DB Desk.app"

Or download the CI DMG, drag DB Desk to Applications, then:

  • macOS 15+: open it once, then System Settings → Privacy & Security → Open Anyway; or
  • remove the quarantine flag:

bash xattr -dr com.apple.quarantine "/Applications/DB Desk.app"

Only do this for a build you trust (this repository's CI or your own).

What you need

  1. Apple Developer Program membership (paid, currently US$99/year).
  2. A Developer ID Application certificate — not “Apple Development”.
  3. Your Team ID (developer.apple.com → Membership).
  4. Notarization credentials: either an app-specific password for your Apple ID, or an App Store Connect API key.

Create the certificate

On a Mac, either:

  • Xcode → Settings → Accounts → select your team → Manage Certificates → + → Developer ID Application, or
  • developer.apple.com → Certificates, Identifiers & Profiles → + → Developer ID Application (upload a CSR made with Keychain Access).

Then export it: Keychain Access → My Certificates → right-click Developer ID Application: … → Export → .p12 with a password.

security find-identity -v -p codesigning
# "Developer ID Application: Your Name (ABCDE12345)"

Add the GitHub secrets

# certificate (.p12) as base64
base64 -i DeveloperID.p12 | gh secret set APPLE_CERTIFICATE
gh secret set APPLE_CERTIFICATE_PASSWORD   # the .p12 password
gh secret set APPLE_SIGNING_IDENTITY --body "Developer ID Application: Your Name (ABCDE12345)"
gh secret set APPLE_TEAM_ID --body "ABCDE12345"

# notarization: Apple ID + app-specific password (appleid.apple.com → Sign-in
# and Security → App-Specific Passwords)
gh secret set APPLE_ID --body "[email protected]"
gh secret set APPLE_PASSWORD

API-key alternative (better for CI, no password/2FA):

gh secret set APPLE_API_ISSUER --body "<issuer-uuid>"
gh secret set APPLE_API_KEY --body "<key-id>"
# write AuthKey_<key-id>.p8 from a secret to a file before the build step

Tauri reads these environment variables directly; the workflow already passes them through, and only signs when APPLE_SIGNING_IDENTITY is set.

What the workflow does

  1. Imports the .p12 and signs dbdesk-server on its own with hardened runtime and the entitlements below (nested binaries must be signed before notarizing the app).
  2. tauri build signs DB Desk.app (hardened runtime), notarizes it with notarytool, and staples the ticket.
  3. Verifies with codesign and spctl.
  4. Produces DB Desk_<version>_<arch>.dmg.

Entitlements

src-tauri/entitlements.plist disables library validation:

<key>com.apple.security.cs.disable-library-validation</key>
<true/>

The Python sidecar is a PyInstaller one-file binary. On launch it extracts its dylibs to a temp directory and dlopen()s them. Hardened runtime (required for notarization) refuses to load libraries not signed by the same Team ID, so without this entitlement the notarized app starts and then the backend dies. com.apple.security.cs.allow-unsigned-executable-memory covers Python extensions that map executable memory at runtime.

Verify a build

codesign --verify --deep --strict --verbose=2 "DB Desk.app"
codesign -dv --verbose=4 "DB Desk.app"     # TeamIdentifier + hardened runtime
spctl --assess --type execute --verbose=2 "DB Desk.app"   # accepted / notarized
xcrun stapler validate "DB Desk.app"

If the DMG itself is not stapled (the app inside is), submit and staple it once:

xcrun notarytool submit "DB Desk_0.1.0_aarch64.dmg" \
  --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APPLE_PASSWORD" --wait
xcrun stapler staple "DB Desk_0.1.0_aarch64.dmg"

Local signed build

export APPLE_SIGNING_IDENTITY="Developer ID Application: Your Name (ABCDE12345)"
export APPLE_ID="[email protected]" APPLE_PASSWORD="app-specific-password" APPLE_TEAM_ID="ABCDE12345"
make bundle

Keep the .p12 and passwords out of the repo; the certificate can be revoked from developer.apple.com if it leaks.

Verifying a release

Every release publishes SHA256SUMS.txt, a Sigstore bundle for it (SHA256SUMS.txt.bundle), and a build-provenance attestation stored by GitHub. Nothing here asks you to trust a key we hold: the signature names the workflow that produced the file.

TAG=v0.13.12
BASE=https://github.com/wzul/dbdesk-app/releases/download/$TAG

# 1. checksums and signature
curl -LO "$BASE/SHA256SUMS.txt" -LO "$BASE/SHA256SUMS.txt.bundle"

# 2. which workflow signed it — keyless, so this is the whole identity
cosign verify-blob \
  --bundle SHA256SUMS.txt.bundle \
  --certificate-identity-regexp '^https://github.com/wzul/dbdesk-app/.github/workflows/release.yml@refs/.*$' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  SHA256SUMS.txt

# 3. the asset you downloaded matches the signed list
sha256sum --ignore-missing -c SHA256SUMS.txt

# 4. and where it was built
gh attestation verify DB.Desk_${TAG#v}_aarch64.dmg --repo wzul/dbdesk-app

If step 2 prints Verified OK, the checksum list came from this repository's release workflow and has not been altered since. If step 3 prints OK for your file, the file is the one that list describes.

A dry run of the same steps without publishing a release:

gh workflow run release.yml --repo wzul/dbdesk-app     # workflow_dispatch, dry_run=true

Edit this page on GitHub