On an Apple Silicon Mac running macOS 27.0.1 (26A434), I am assessing the arm64 command-line tool age v1.3.2. The downloaded file retains its quarantine attribute.
The command spctl --assess --type execute --verbose=2 returned exit code 1 with: “internal error in Code Signing subsystem”. A later codesign --verify --strict --verbose=4 check returned exit code 0. The file hash and recorded attributes did not change around the strict verification.
The tool is ad-hoc/linker-signed, with no TeamIdentifier. I have not executed the tool or removed quarantine. The exact environment and independent raw output file for the first spctl assessment were not recorded; the error above is a transcription of the observed output.
What is the supported way to assess a standalone command-line tool in this situation? How can I distinguish a policy rejection from an assessment failure, and what further diagnostics would you recommend without running the tool or reducing system security?
It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.
You wrote:
Our goal is encrypted backup and restore for an internal macOS app using the age command-line tool.
Just so we’re clear, you’re referring to this right?
What is the supported way to test and distribute this helper securely?
It very much depends on the nature of your product, but if you’re building a Mac app then standard practice is to embed the helper tool into your app and then sign and notarise it as part of your app’s distribution workflow.
For example, if you were building a sandboxed app to distribute on the Mac App Store you might use the process described in the second part (Embed an externally built tool) of Embedding a command-line tool in a sandboxed app.
The general process also works for non-sandboxed apps built with Xcode.
OTOH, if you’re not using Xcode to build your product then I recommend:
IMPORTANT When you build the tool, make sure you use the Apple linker. Go projects are notorious for using their own linker, which can result in all sorts of weird problems.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"