Repository navigation
Verify bare binaries in macos_verify_code_signing - #782
Merged
Merged
Conversation
CLIs ship bare Mach-O binaries, so `beeper/cli` and the Day One CLI each hand-roll this verification because the action only accepted `.app` and `.dmg`. Raised in beeper/cli#56 (comment). --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
`spctl --type execute` rejects every bare binary, notarized or not, with `the code is valid but does not seem to be an app`. The stubbed specs could not catch this; running against a real binary did. Checked on a notarized `beeper` binary from Buildkite: `--type open --context context:primary-signature` reports `Notarized Developer ID`, and rejects a Developer ID re-signed copy as `Unnotarized Developer ID`. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
--- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
mokagio
commented
Nov 6, 2026
The method doc comment now covers only what affects the caller. Why `spctl` runs with `--type open` is an implementation detail, so it sits inline. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
A caller that verifies before notarizing passes `verify_notarization: false`, so nothing asserted the hardened runtime that notarization will later demand. beeper/cli#64 kept its own check for exactly this. The option defaults to `false` so existing callers are unaffected. Disk images are skipped with a warning rather than failed, because a list mixing an app with its `.dmg` is a normal call. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
--- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
mokagio
added a commit
to beeper/cli
that referenced
this pull request
Nov 6, 2026
The `macos_verify_code_signing` action gained a `verify_hardened_runtime` option in wordpress-mobile/release-toolkit#782, so the lane no longer needs its own `codesign --display` check. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
mokagio
commented
Nov 6, 2026
A correctly configured call that lists an app with its `.dmg` should not print a warning. The docs now state outright that notarization implies the hardened runtime, which is why the option is for verifying before submission. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
mokagio
marked this pull request as ready for review
November 6, 2026 21:56
AliSoftware
reviewed
Nov 10, 2026
Both checks searched all of `codesign --display`'s output, which includes the `Executable=` path. A non-hardened binary under a directory named `flags=0x10000(runtime)` passed `verify_hardened_runtime`, and any authority that merely started with the expected one passed `expected_authority`. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
`codesign --display` shows only the slice matching the host, so a universal binary or app whose other slice lacked the hardened runtime, or had a different authority, passed. Reproduced with a fat binary of a hardened arm64 slice and a non-hardened x86_64 one: it passed before this change and fails after it. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
`verify_disk_image` only took `verify_hardened_runtime` to log that it skips the check, while passing `false` on to the signature details, which read as a value being ignored. The skip is now logged where the artifact type is picked. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
A binary named like `tool-v1.2.3` has an extension as far as `File.extname` is concerned, so it was refused as an unknown artifact. The content identifies a bare binary regardless of its name, and still refuses an extensionless file that isn't one, such as a script. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Extension-based dispatch lets an unsigned Mach-O renamed with a .dmg suffix bypass signature, authority, and hardened-runtime checks when notarization verification is disabled.
1 open issue
2 resolved since last review
Review effort: Balanced
AliSoftware
approved these changes
Nov 16, 2026
AliSoftware
left a comment
Contributor
There was a problem hiding this comment.
Approving to unblock, though I think it'd make sense to apply the GitHub Suggestion proposed by the last Copilot's review comment before merging.
A bare binary named like a disk image took the `.dmg` path, where an unsigned artifact is tolerated. With `verify_notarization: false`, an unsigned binary then passed, `expected_authority` and `verify_hardened_runtime` notwithstanding. Raised by Copilot: #782 (comment) `.app` bundles are directories, so `mach_o?` is false for them and they still reach their own branch. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
Fails on the previous dispatch order, where the unsigned binary passed as an unsigned `.dmg`. --- Generated with the help of Claude Code (Opus 5.5), https://code.claude.com
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.

What does it do?
Lets
macos_verify_code_signingverify bare binaries, recognized as Mach-O by their content rather than their name, so CLIs can stop hand-rolling this check.@iangmaia asked why
beeper/clihad its own lane instead of using the action; the answer was that the action only took.appand.dmg.It also adds a
verify_hardened_runtimeoption, off by default, for app bundles and bare binaries.Notarization requires the hardened runtime, so
verify_notarizationalready covers it implicitly, but a caller verifying before submission has to turn that off.beeper/clistill keeps its own check for this; once this lands it can drop it.Gotchas
--type open --context context:primary-signature, not the--type executeused for app bundles.--type executerejects every bare binary, notarized or not, withthe code is valid but does not seem to be an app.staplercheck and the Gatekeeper result relies on an online lookup that can lag a fresh submission.Pass
verify_notarization: falsewhen verifying right after signing.verify_hardened_runtimeskips disk images instead of failing, so a list mixing an app with its.dmgstill works.expected_authorityandverify_hardened_runtimecheck every architecture of universal code.codesign --displayalone shows only the host's slice.How to test
The specs stub the shell commands, so I also ran the action on a notarized
beeperarm64 binary from Buildkite:Notarized Developer ID)verify_hardened_runtime, run directly against ad-hoc signed copies of/usr/bin/true, passes with--options runtime(flags=0x10002(adhoc,runtime)) and fails without it.Re-signing with Developer ID without notarizing makes
spctlitself reportrejected,source=Unnotarized Developer ID.I ran that command directly, not through the action.
Checklist before requesting a review
bundle exec rubocopto test for code style violations and recommendations.specs/*_spec.rb) if applicable.bundle exec rspecto run the whole test suite and ensure all your tests pass. Only this action's spec ran locally; the full suite is left to CI.CHANGELOG.mdfile to describe your changes under the appropriate existing###subsection of the existing## Trunksection.Note
Notice the missing
apps-infra-toolingreview request. More in pbArwn-89X-p2#comment-9038