-
Notifications
You must be signed in to change notification settings - Fork 1
feat: sign nrq darwin binaries with a stable code-signing identity #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,13 @@ builds: | |
| - -X github.com/open-cli-collective/newrelic-cli/internal/version.Version={{.Version}} | ||
| - -X github.com/open-cli-collective/newrelic-cli/internal/version.Commit={{.Commit}} | ||
| - -X github.com/open-cli-collective/newrelic-cli/internal/version.BuildDate={{.Date}} | ||
| # macOS code-signing — stable DR so Keychain "Always Allow" survives brew upgrade | ||
| # (cli-common distribution.md §2A). Logic + identity live in open-cli-collective/.github | ||
| # (macos-codesign-setup), which exports CODESIGN_DARWIN_SCRIPT (absolute). Unset in | ||
| # local builds → signing skipped. | ||
| hooks: | ||
| post: | ||
| - cmd: bash -c 'f="${CODESIGN_DARWIN_SCRIPT:-}"; if [ -z "$f" ]; then echo "skip codesign (CODESIGN_DARWIN_SCRIPT unset, local build)"; exit 0; fi; [ -x "$f" ] || { echo "CODESIGN_DARWIN_SCRIPT not executable ($f)" >&2; exit 1; }; exec "$f" "$0" "$1"' "{{ .Path }}" "{{ .Os }}" | ||
| - id: nrq-unix-win | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Low (harness-engineering:harness-architecture-reviewer): The hook silently no-ops when CODESIGN_DARWIN_SCRIPT is unset, which is intentional for local builds. In CI, if the upstream macos-codesign-setup action fails to export the variable, GoReleaser succeeds and archives an unsigned darwin binary without any build-level failure. The only enforcement layer is the external darwin-gate check-signature step. If that gate is ever skipped or misconfigured, unsigned binaries can ship silently. A lightweight guard asserting CODESIGN_DARWIN_SCRIPT is set when CI=true and GORELEASER_CURRENT_TAG is set would close this gap at the build level. Reply to this thread when addressed. |
||
| main: ./cmd/nrq | ||
| binary: nrq | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.0 | ||
| 1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Low (harness-engineering:harness-knowledge-reviewer): The error message 'CODESIGN_DARWIN_SCRIPT not executable' conflates two distinct failure modes: file-not-found and file-not-executable. A CI operator seeing this for a missing file will be misled. Consider splitting:
[ -e "$f" ] || { echo "CODESIGN_DARWIN_SCRIPT path does not exist: $f" >&2; exit 1; }; [ -x "$f" ] || { echo "CODESIGN_DARWIN_SCRIPT not executable: $f" >&2; exit 1; }.Reply to this thread when addressed.