Repository navigation
ci(release): sign and notarize macOS binaries - #128
Merged
Merged
Conversation
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.
Closes #126
Why
The darwin binaries are neither signed with a Developer ID certificate nor notarized. A browser download is quarantined, so on first run Gatekeeper blocks it with "Apple could not verify scanoss-cli is free of malware" and offers only Move to Trash.
Scope
.goreleaser.yaml: anotarize.macosblock signs and notarizes thescanossbuild (darwin amd64 and arm64). It runs from the existing Ubuntu runner, so no macOS runner is needed. It is enabled only whenMACOS_SIGN_P12is set, so forks and local runs are unchanged.release.yml: passes the fiveMACOS_*secrets to GoReleaser.release.yml:test-release-binarieschecks on macOS that the published binary carries aDeveloper ID Applicationsignature. The existing smoke test cannot catch this, because aghdownload is not quarantined.Secrets
Already set on the repository:
MACOS_SIGN_P12.p12, base64)MACOS_SIGN_PASSWORD.p12passwordMACOS_NOTARY_KEY.p8, base64)MACOS_NOTARY_KEY_IDMACOS_NOTARY_ISSUER_IDBlast Radius
Release pipeline only. Linux and Windows archives, the libscanoss libraries and the Docker image are unchanged. A notarization failure fails the release job before anything is published, and releases are created as drafts.
Out of scope
The libscanoss
.dylibfiles are built outside GoReleaser and remain unsigned. They need acodesign+notarytoolstep inbuild-libscanoss.yml, as a follow-up.Verification
goreleaser checkpasses..p12decodes toDeveloper ID Application: SCAN Open Source Solutions SL (SS9FAM7FV6)with its private key.goreleaser release --snapshot --clean --skip=dockeron this branch, with the same credentials, signed and notarized both darwin binaries (53s for notarization).codesign --verify --strictwithAuthority=Developer ID Application: SCAN Open Source Solutions SL (SS9FAM7FV6), and the binary insidescanoss-cli-darwin-arm64.tar.gzis signed.scanoss-cli --version) without the Gatekeeper dialog.Release
Also cuts v0.14.2 in the CHANGELOG. Tag
v0.14.2after merge; the release job then signs and notarizes, andtest-release-binarieschecks the signature.