Skip to content

refactor(cli): harden macOS signature checks per #5675 review#5683

Open
avallete wants to merge 2 commits into
developfrom
claude/macos-signing-review-followups
Open

refactor(cli): harden macOS signature checks per #5675 review#5683
avallete wants to merge 2 commits into
developfrom
claude/macos-signing-review-followups

Conversation

@avallete

Copy link
Copy Markdown
Member

Follow-up to the merged macOS code-signing change (#5675), addressing the three non-blocking review points from @Coly010.

Changes

  1. Exact identifier match instead of substring. The previous checks used includes("identifier: com.supabase.cli"), which also matches com.supabase.cli-go — so a sidecar accidentally signed with the SFE's identifier would have passed. Both the build-time verification in build.ts and the macOS smoke-test helper now extract and compare the whole identifier value, so each binary is verified against exactly its own identifier.

  2. signDarwinBinaries no longer reaches into the module-level shell. It now takes shell as a parameter and resolves its binary list via darwinBinariesForShell(shell), so the function stands on its own and the legacy/next split lives in one place.

  3. Single source of truth for identifiers. New apps/cli/scripts/macos-signing.ts exports MACOS_IDENTIFIERS plus macIdentifierFor() / darwinBinariesForShell() helpers, imported by both build.ts (signing) and the smoke-test helper (verification). The third copy — the hardcoded, substring-matching Verify macOS signatures step in build-cli-artifacts.yml — is removed: build.ts already verifies each signature against the shared source during the build and throws on mismatch (failing the job), so the separate step was redundant and was the remaining drift/substring risk. If you'd prefer to keep an explicit standalone CI verification step, I can re-add one that imports the shared module instead of hardcoding the identifier — let me know.

The sign-on-Linux / verify-on-macOS approach is unchanged.

🤖 Generated with Claude Code


Generated by Claude Code

Address three review points on the macOS code-signing change:

1. Exact identifier match instead of substring. Both the build-time
   verification (build.ts) and the macOS smoke-test helper now compare the
   full signed identifier, so a sidecar mistakenly signed as
   `com.supabase.cli` can no longer satisfy the `com.supabase.cli-go` check.

2. signDarwinBinaries no longer reaches into the module-level `shell`. It
   takes `shell` as a parameter and resolves the binary list via
   darwinBinariesForShell, so it stands on its own.

3. Single source of truth for identifiers. New apps/cli/scripts/macos-signing.ts
   exports MACOS_IDENTIFIERS + helpers, imported by both build.ts and the
   smoke-test helper. The redundant (and substring-matching) "Verify macOS
   signatures" workflow step is removed — build.ts already verifies each
   signature against the shared source and fails the build on mismatch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GnLjngbm48rMYVwn9Guduc
@avallete avallete requested a review from a team as a code owner June 24, 2026 13:47
@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.
Credits must be used to enable repository wide code reviews.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@a1ca41eb9a95df44badb3c271117ba79ea988aa2

Preview package for commit a1ca41e.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants