fix: add macOS code signing to release build pipeline#417
Open
KylinDC wants to merge 1 commit into
Open
Conversation
KylinDC
marked this pull request as draft
July 24, 2026 11:52
KylinDC
marked this pull request as ready for review
July 24, 2026 11:58
KylinDC
force-pushed
the
fix/fix-macos-build-signature
branch
from
July 24, 2026 11:59
ef2fc47 to
7a75077
Compare
Previously, the release binaries for macOS (aws-vault-darwin-amd64 and aws-vault-darwin-arm64) were only adhoc/linker-signed, lacking a TeamIdentifier. This caused macOS to treat every binary update as an untrusted new application, re-prompting for keychain access. Changes: - Makefile: Add codesign --options runtime --timestamp to the darwin cross-compile targets, gated on CERT_ID being set (consistent with the local aws-vault target) - CI release workflow: Add Apple Developer certificate import and codesign steps to the build-macos job, gated on secrets being configured for graceful fallback in forks - CI release workflow: Optionally create notarized DMGs via the existing bin/create-dmg script when KEYCHAIN_PROFILE is configured Fixes the repeated macOS keychain authorization prompt that appeared after every Homebrew upgrade.
KylinDC
force-pushed
the
fix/fix-macos-build-signature
branch
from
July 24, 2026 12:36
f0072a9 to
d786384
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
macOS release binaries (
aws-vault-darwin-amd64andaws-vault-darwin-arm64) are only adhoc/linker-signed, resulting in:This causes macOS to treat every binary update (e.g., via
brew upgrade) as a completely new, untrusted application — forcing users to re-authorize keychain access after every upgrade.Combined with
KeychainNotTrustApplication: truein the keyring code, users get redundant authorization prompts.Changes
Makefile
codesign --options runtime --timestampto theaws-vault-darwin-amd64andaws-vault-darwin-arm64targetsCERT_IDbeing set, matching the existing localaws-vaulttarget behaviorCI release workflow (
.github/workflows/release.yaml)build-macosjob (imports .p12, creates temporary keychain)CERT_IDis auto-extracted from the imported certificate viasecurity find-identity— no separate secret needed, and it can never mismatchCERT_IDis only written to the environment after a successful import, so the Makefile'sifdef CERT_IDnaturally skips signing when the cert wasn't imported — no separate CI guard neededbin/create-dmgscript (gated onKEYCHAIN_PROFILEsecret)Required GitHub Secrets (optional, for signing to activate)
CERTIFICATE_OSX_P12CERTIFICATE_PASSWORDKEYCHAIN_PASSWORDKEYCHAIN_PROFILEHow to verify the signature
After a signed release, verify with:
Or a one-liner check:
Questions for maintainer
Makefileline 3Developer ID Application: ByteNess (R)bin/create-dmgline 19Developer ID Application: ByteNess Inc (R)Which is the correct certificate name? I'll align both once confirmed. (CI auto-detects it, so this only affects local
make dmgs.)DMG or CLI binary only? — The CI currently uploads raw binaries to GitHub Releases (which Homebrew consumes). I added an optional DMG step via
bin/create-dmg, but for a CLI tool the DMG might be unnecessary overhead. Do you want to:If you prefer CLI-only, I'll remove the DMG/notarization step from the workflow.