Attempting to launch self-compiled developer binaries, command-line tools, or third-party open-source applications on macOS Sonoma or Sequoia often terminates with the terminal error: The operation couldn't be completed. (OSStatus error -67061) or kSecCSUnsigned / Code signature invalid. In macOS security architecture, OSStatus error -67061 translates directly to errSecCSUnsigned. This indicates that the macOS kernel Gatekeeper and Security framework refused execution because the Mach-O binary lacks a valid digital cryptographic code signature or possesses broken entitlements.
Why Does macOS Throw OSStatus Error -67061?
The execution refusal is enforced by Apple’s strict code integrity subsystem:
- Unsigned Mach-O Binary: Compiling code locally with GCC, Clang, or Go without applying an ad-hoc or developer code signature.
- Broken Code Signature Seals: Modifying resource bundles, plist manifests, or dynamic libraries inside an existing
.appbundle after signing. - Gatekeeper Extended Quarantine Attribute: Downloading unsigned binaries via web browsers attaching the
com.apple.quarantineextended file attribute. - Apple Silicon (ARM64) Mandatory Signing Policy: On Apple Silicon Macs (M1/M2/M3/M4), the kernel strictly forbids running any ARM64 binary that lacks at least an ad-hoc code signature.
Step 1: Check Binary Signature Details Using codesign
Verify whether the binary is completely unsigned or has invalid signature seals.
- Open Terminal on your Mac.
- Run the
codesignverification command against your binary or application bundle:codesign -dvvv /path/to/application_or_binary - If the output returns
code object is not signed at allorinvalid signature (code or signature have been modified), the signature must be applied afresh.
Step 2: Apply an Ad-Hoc Code Signature
Satisfy Apple Silicon and Gatekeeper requirements by applying a valid local ad-hoc signature.
- In Terminal, execute the following command (replacing the path with your binary path):
codesign --force --deep --sign - /path/to/application_or_binary - The
-s -flag applies an ad-hoc signature recognised by the local macOS kernel. - Verify the newly applied signature:
codesign -v /path/to/application_or_binary - If no output is returned, the signature verification succeeded.
Step 3: Remove Gatekeeper Quarantine Extended Attributes
Strip web download quarantine flags preventing execution.
- Check if the quarantine attribute exists on the file:
xattr -l /path/to/application_or_binary - If
com.apple.quarantineis present, delete it:xattr -d com.apple.quarantine /path/to/application_or_binary - For complete
.appbundles, clear attributes recursively:sudo xattr -cr /Applications/YourApp.app - Execute the application; macOS will launch the program without triggering error -67061.