Skip to content

feat(desktop): sign + notarize cliproxyapi-plusplus electron app via fleet-ops - #1063

Merged
KooshaPari merged 1 commit into
mainfrom
feat/cliproxyapi-plusplus-macos-signing-infisical-20260902T0050Z
Sep 2, 2026
Merged

feat(desktop): sign + notarize cliproxyapi-plusplus electron app via fleet-ops#1063
KooshaPari merged 1 commit into
mainfrom
feat/cliproxyapi-plusplus-macos-signing-infisical-20260902T0050Z

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Sep 2, 2026

Copy link
Copy Markdown
Owner

User description

feat(desktop): add macos signing workflow to cliproxyapi-plusplus

Summary

cliproxyapi-plusplus is a fork of a CLI proxy API tool with an Electron desktop surface. The fork needs Apple signing for any distributable macOS artifact. This PR adds the consumer workflow.

Notes

Fork; minimal Electron desktop surface

What this PR does

  1. Adds Entitlements.plist at apps/desktop/Entitlements.plist (minimal sandbox-safe defaults: network client, JIT where needed; repo-specific extras inlined)
  2. Adds .github/workflows/release-macos.yml that calls the reusable workflow kooshapari/phenotype-fleet-ops/.github/workflows/macos-release.yml@main
  3. The reusable workflow pulls Apple Developer secrets from Infisical (project 8efe392e-56a6-4c3c-89f9-8141183dd7e8/apple/cliproxyapi-plusplus), runs codesign + xcrun notarytool + xcrun stapler, attaches the signed + notarized DMG to the GitHub Release

Why now

  • Forked repo with Electron desktop surface
  • Local ForgeCode session evidence: 4 sessions referenced cliproxyapi-plusplus + Apple tokens

Constraints honored

  • Zero billed runners — every job targets self-hosted runners only ([self-hosted, macos, arm64, mac-signing])
  • Infisical is the only secret store — no GitHub Actions secrets for Apple Developer creds; only INFISICAL_TOKEN (service identity, not Apple-specific) is in repo secrets
  • No .p12 ever committed — cert + .p8 API key are base64-encoded secrets in Infisical, decoded to runner.disk/.apple-keys/ per build only, mode 600
  • Single source of truth — the signing/notarization pipeline lives in phenotype-fleet-ops; this repo just calls it. Any future repo adopting Apple signing gets the same pipeline by changing app-name and build-cmd

Verification plan

  1. Tag v0.1.0-macsigtestrelease-macos.yml triggers
  2. Download cliproxyapi-plusplus-macos-signed artifact
  3. codesign -dvvv cliproxyapi-plusplus.app → Developer ID
  4. xcrun stapler validate passes
  5. Launch from Finder → no Gatekeeper dialog

Pre-merge checklist (run by Koosha)

  • Provision Infisical secret /apple/cliproxyapi-plusplus with these keys (if missing, default to /apple org-level path):
    • APPLE_TEAM_ID
    • APPLE_DEVELOPER_ID_P12_BASE64
    • APPLE_DEVELOPER_ID_P12_PASSWORD
    • APPLE_NOTARIZATION_ISSUER_ID
    • APPLE_NOTARIZATION_KEY_ID
    • APPLE_NOTARIZATION_KEY_P8_BASE64
    • APPLE_BUNDLE_ID = app.phenotype.cliproxy
  • Provision repo secret INFISICAL_TOKEN (machine identity, scoped to project 8efe392e-56a6-4c3c-89f9-8141183dd7e8)
  • Confirm the org-level self-hosted Mac runner KooshaPari is online with labels [self-hosted, macos, arm64, mac-signing]
  • Confirm kooshapari/phenotype-fleet-ops@main contains the new .github/workflows/macos-release.yml (already shipped at commit fd8373f)
  • Tag a v*.*.*-macsigtest to dry-run
  • After green, remove -macsigtest and re-tag for real release

CodeAnt-AI Description

Publish signed and notarized macOS desktop releases

What Changed

  • Version tags or a manual trigger now build macOS Intel and Apple Silicon desktop apps and attach a DMG to the GitHub release
  • Releases are signed and notarized by Apple before distribution
  • The app is granted the permissions needed for network access and Electron runtime features

Impact

✅ Trusted macOS downloads
✅ Installable releases on Intel and Apple Silicon Macs
✅ Working network access in the desktop app

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…fleet-ops

Adds entitlements and .github/workflows/release-macos.yml.
The reusable workflow at kooshapari/phenotype-fleet-ops/.github/workflows/macos-release.yml@main
pulls Apple Developer secrets from Infisical (project 8efe392e-56a6-4c3c-89f9-8141183dd7e8, path /apple/cliproxyapi-plusplus).

Constraints: zero billed runners (self-hosted only), no .p12 committed,
Infisical as the only secret store.

Refs: /tmp/kooshapari-audit/per_repo_drops/cliproxyapi-plusplus/PR_BODY.md
Copilot AI lite review requested due to automatic review settings September 2, 2026 00:50
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@codeant-ai

codeant-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 8f60e70 Sep 02, 2026 · 00:50 00:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai

codeant-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Sep 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment on lines +25 to +28
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The entitlement dictionary repeats com.apple.security.network.client and com.apple.security.cs.allow-jit; plist validation or signing can reject duplicate dictionary keys. [type error]

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** apps/desktop/Entitlements.plist
**Line:** 25:28
**Comment:**
	*Type Error: The entitlement dictionary repeats `com.apple.security.network.client` and `com.apple.security.cs.allow-jit`; plist validation or signing can reject duplicate dictionary keys.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@KooshaPari
KooshaPari merged commit 09591e0 into main Sep 2, 2026
15 of 20 checks passed
@KooshaPari
KooshaPari deleted the feat/cliproxyapi-plusplus-macos-signing-infisical-20260902T0050Z branch September 2, 2026 00:58
jobs:
macos:
name: Build, sign, notarize cliproxyapi-plusplus
uses: kooshapari/phenotype-fleet-ops/.github/workflows/macos-release.yml@main

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Using @main for reusable workflow reference is a security risk

Referencing a reusable workflow by branch (@main) means the workflow can change without your knowledge. If the upstream repository is compromised, malicious code could execute in your workflow with access to your INFISICAL_TOKEN secret.

Pin to a full commit SHA for supply-chain security:

Suggested change
uses: kooshapari/phenotype-fleet-ops/.github/workflows/macos-release.yml@main
uses: kooshapari/phenotype-fleet-ops/.github/workflows/macos-release.yml@fd8373f

Replace fd8373f with the actual commit SHA you trust.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

pnpm install --frozen-lockfile
pnpm --filter desktop build
pnpm --filter desktop electron-builder --mac --x64 --arm64
cp -R apps/desktop/dist/mac*/cliproxyapi-plusplus.app dist/macos/ || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: || true suppresses errors, hiding build failures

If the cp command fails (e.g., wrong source path, permission issue), the workflow continues silently. This could result in signing/notarizing a missing or incomplete app bundle, producing a broken release artifact.

Remove || true or add explicit error handling:

Suggested change
cp -R apps/desktop/dist/mac*/cliproxyapi-plusplus.app dist/macos/ || true
cp -R apps/desktop/dist/mac*/cliproxyapi-plusplus.app dist/macos/

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before next release

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.github/workflows/release-macos.yml 23 Using @main for reusable workflow is a security risk — pin to commit SHA
.github/workflows/release-macos.yml 31 || true suppresses errors, hiding build failures
Files Reviewed (2 files)
  • .github/workflows/release-macos.yml - 2 issues
  • apps/desktop/Entitlements.plist - 0 new issues (duplicate key issue already flagged by CodeAnt AI)

Fix these issues in Kilo Cloud


Reviewed by free · Input: 20.5K · Output: 5.7K · Cached: 126.3K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants