Skip to content

Embed TeamIdentifier in macOS CodeDirectory#392

Merged
jeremy merged 1 commit intomainfrom
macos-codesign-teamidentifier
Mar 27, 2026
Merged

Embed TeamIdentifier in macOS CodeDirectory#392
jeremy merged 1 commit intomainfrom
macos-codesign-teamidentifier

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 27, 2026

Summary

  • Replace GoReleaser's built-in notarize (broken goreleaser/quill fork) with direct anchore/quill v0.7.1 CLI calls that correctly populate the TeamIdentifier field in the CodeDirectory
  • Sign darwin binaries via GoReleaser build hook (before archiving), so archives, checksums, Homebrew cask, and Scoop manifests all see correctly signed binaries
  • Notarize separately after GoReleaser publishes (non-destructive for bare Mach-O)
  • Add post-release macos-verify job on a macOS runner that asserts TeamIdentifier and hardened runtime for both darwin/amd64 and darwin/arm64; notarization status is best-effort telemetry
  • Signing hook fails closed in CI (missing quill/certs/password = hard error) but skips silently in local dev
  • Credentials written to $RUNNER_TEMP with umask 077; quill added to $GITHUB_PATH explicitly
  • Password passed via QUILL_SIGN_PASSWORD env var (quill's native config, not a CLI flag); notarize uses --notary-* flag names

Fixes Help Scout #3270572064. Root cause: anchore/quill#147.
Follow-up: #393 tracks reverting when goreleaser/quill syncs the fix.

Test plan

  • make test-release passes locally (hook no-ops without quill/certs)
  • goreleaser check validates config
  • actionlint passes on release workflow
  • bash -n scripts/sign-darwin.sh passes
  • First release on this branch: verify codesign -dv --verbose=4 basecamp 2>&1 | grep TeamIdentifier returns 2WNYUYRS7G
  • Verify macos-verify job passes in release workflow
  • Verify notarization accepted via spctl -a -vvv -t install basecamp

Copilot AI review requested due to automatic review settings March 27, 2026 18:55
@github-actions github-actions bot added ci CI/CD workflows docs labels Mar 27, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/release.yml
  • .goreleaser.yaml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release.yml">

<violation number="1" location=".github/workflows/release.yml:339">
P2: The notarization verification step only warns on failure, so the workflow can pass without notarization being accepted.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the macOS release pipeline to ensure signed Mach-O binaries include a populated TeamIdentifier in the CodeDirectory by switching from GoReleaser’s embedded goreleaser/quill fork to direct anchore/quill CLI usage.

Changes:

  • Add a GoReleaser build hook to sign darwin binaries via scripts/sign-darwin.sh before archiving.
  • Disable GoReleaser’s built-in macOS notarization and run quill notarize as a separate post-publish workflow step.
  • Add a post-release macos-verify job and document signing/notarization tradeoffs in RELEASING.md.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
scripts/sign-darwin.sh New GoReleaser build hook script to sign darwin binaries using quill sign.
RELEASING.md Documents the updated macOS signing/notarization flow and tradeoffs.
.goreleaser.yaml Adds the signing hook and disables GoReleaser notarization.
.github/workflows/release.yml Installs quill, prepares signing creds, notarizes post-publish, and adds a macOS verification job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a0b99db3bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI review requested due to automatic review settings March 27, 2026 20:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy force-pushed the macos-codesign-teamidentifier branch from 43fc75d to 8738e15 Compare March 27, 2026 20:12
The goreleaser/quill fork (embedded in GoReleaser v2.14.x) never populates
the TeamIdentifier field in the CodeDirectory during signing
(anchore/quill#147). Replace the built-in notarize block with direct
anchore/quill v0.7.1 CLI calls:

- Build hook (scripts/sign-darwin.sh) signs darwin binaries before
  archiving so archives, checksums, and tap manifests are correct.
  Fails closed in CI when QUILL_SIGN_P12 is set; skips in local dev.
- Notarization runs as a separate workflow step after GoReleaser publishes
  using --notary-* flags. Password via QUILL_SIGN_PASSWORD env var.
- Post-release macos-verify job asserts TeamIdentifier and hardened runtime
  for both darwin/amd64 and darwin/arm64 on a macOS runner. Notarization
  status is best-effort telemetry (ticket propagation can lag).
- Credentials written to $RUNNER_TEMP with umask 077, cleaned up via
  if: always(). Quill added to $GITHUB_PATH explicitly.

Revert path: #393 tracks reverting when goreleaser/quill syncs the fix.
@jeremy jeremy force-pushed the macos-codesign-teamidentifier branch from 8738e15 to 0015482 Compare March 27, 2026 20:43
@jeremy jeremy merged commit fb8b093 into main Mar 27, 2026
25 checks passed
@jeremy jeremy deleted the macos-codesign-teamidentifier branch March 27, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci CI/CD workflows docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants