ignission / ignission/claude-code-ark
feat(release): macOS .app の Developer ID 署名 + 公証 (notarization) を有効化
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 1h 31m
- Merged PRs (30d)
- 77
Description
背景
現在 .app は 未署名配布 (identity: null、gatekeeperAssess: false、CSC_IDENTITY_AUTO_DISCOVERY: false)。
このため:
- 初回起動で Gatekeeper にブロックされ、ユーザーは Finder の右クリック→開くを強いられる
- Homebrew Cask の
caveatsにも回避手順を書く必要があり、ユーザー体験が落ちる homebrew/cask(公式) は未署名 Apple Silicon app を reject 条件としているため、third-party tap 配布に限定される
Apple Developer Program に加入済みのため、Developer ID Application 証明書での署名 + Apple の notarization 通過まで対応すれば上記が全て解消する。
事前準備 (実装着手前にユーザー側で用意)
| 項目 | 取得元 | 用途 |
|---|---|---|
| Developer ID Application 証明書 (.p12) | https://developer.apple.com/account/resources/certificates - 「Developer ID Application」を新規作成 → Keychain Access で書き出し (パスワード付き .p12) | .app への code signing |
| 証明書のパスワード | .p12 書き出し時に自身で設定 | CSC_KEY_PASSWORD |
| 証明書 .p12 を base64 エンコード | base64 -i cert.p12 -o cert.p12.b64 |
CSC_LINK (CI に渡す形) |
| App-Specific Password | https://account.apple.com → サインインとセキュリティ → アプリ用パスワード | notarization (xcrun notarytool) |
| Apple Team ID | https://developer.apple.com/account → Membership Detail | notarization |
| Apple ID | (既知) | notarization |
実装タスク
1. packages/desktop/electron-builder.yml
-
mac.identity: nullを削除 (electron-builder がCSC_LINKから自動解決) -
mac.gatekeeperAssess: falseを削除 (署名済みなら無効化不要) -
mac.notarize設定を追加 (teamId: $APPLE_TEAM_ID経由) -
mac.hardenedRuntime: true+mac.entitlements: build-assets/entitlements.mac.plist(Electron が require する entitlement の用意) -
build-assets/entitlements.mac.plistを新規作成 (JIT, allow-unsigned-executable-memory 等の Electron 標準 entitlement)
2. .github/workflows/release.yml
-
Package .app (arm64 zip)step のenv:CSC_IDENTITY_AUTO_DISCOVERY: false→ 削除CSC_LINK: ${{ secrets.CSC_LINK }}追加 (.p12 を base64 化したもの)CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}追加APPLE_ID: ${{ secrets.APPLE_ID }}追加APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}追加APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}追加
- (必要なら) notarization 結果の verification step を追加:
spctl --assess --type execute Ark.appで「accepted」となることを確認 - smoke test step は署名済み .app でも同じ動作なのでそのまま
3. GitHub Actions Secrets 設定 (リポジトリ側)
ignission/claude-code-ark の Settings → Secrets and variables → Actions に以下を追加:
-
CSC_LINK(base64 エンコードされた .p12) -
CSC_KEY_PASSWORD(.p12 のパスワード) -
APPLE_ID(Apple Developer の Apple ID) -
APPLE_APP_SPECIFIC_PASSWORD(App-Specific Password) -
APPLE_TEAM_ID(Apple Developer Team ID)
4. ignission/homebrew-tap の Casks/ark.rb
-
caveatsから Gatekeeper 回避手順 (右クリック→開く) を削除 - (任意) 後日
homebrew/cask公式への投稿を検討
5. ドキュメント
-
CLAUDE.mdの F0:B-1 設計判断 (未署名配布) のメモを更新、または削除 - README / リリースノートに「v1.3.0 から署名済み配布に移行」を明記
受入条件
- v1.3.0 タグ push で release.yml が成功し、signed + notarized な
.appzip が GitHub Release に upload される - ダウンロードした
.appをローカルで起動した際に Gatekeeper の警告が出ない -
spctl --assess --type execute /Applications/Ark.appがacceptedを返す -
brew install --cask ignission/tap/arkした直後にopen /Applications/Ark.appで右クリック等なしに起動する - Homebrew Cask の caveats が空 or 必要最小限になる
参考
- electron-builder mac 設定: https://www.electron.build/configuration/mac
- notarization 公式手順: https://developer.apple.com/documentation/security/customizing_the_notarization_workflow
- electron-builder notarize オプション (v25): https://www.electron.build/configuration/mac#NotarizeOptions
- Homebrew Acceptable Casks: https://docs.brew.sh/Acceptable-Casks
補足
- v1.2.0 までは未署名で配布済み。本 issue 対応後の v1.3.0 から signed 切替予定
- 証明書の有効期限 (Developer ID Application は 5 年) 切れの runbook も別途整備推奨
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/desktop/electron-builder.yml and .github/workflows/release.yml, then review build-assets/entitlements.mac.plist and the referenced Homebrew Cask and documentation files. Verify the v1.3.0 workflow produces a signed, notarized .app, spctl accepts it, and the Homebrew install launches without Gatekeeper workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, github-actions, macos, typescript
- Domain
- ci-cd, desktop, release, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100