I have tried to manually install binaries using Finder by clicking and dragging from the Desktop into "/usr/local/bin/". The binaries come with a collection of frameworks etc. All the binaries are adhoc signed. macOS asks for Admin credentials which is fine. But then, when I execute the binaries in Terminal, Gatekeeper shows the now expected "'[binary"] Not Opened Apple could not verify ........" etc. It shows that dialog for every component and requires user input 2-3 times to allow each component of which there are perhaps dozens.
BUT, none of that happens if I install those binaries using AppleScript. So, it might have a call like this:
do shell script "curl -L " & download_URL & " -o " & download_binary_zip with administrator privileges
do shell script "unzip -o " & download_binary_zip & " -d " & usr_bin_folder with administrator privileges
The resulting installs work perfectly.
Is this intended ? Using both install methods requires Admin credentials. Why does using a script work but using Finder does not ?
The reason why AppleScript is working is that it doesn’t quarantine those binaries. In general, Gatekeeper only runs on things that are quarantined.
IMPORTANT This isn’t universally true today. In some circumstances Gatekeeper will check code even if it’s not quarantined. Moreover, it’s easy to imagine a future where it’s not true at all.
Where do these binaries come from? My general advice is that you arrange to get them signed properly. Without that, things are just complicated.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"