0

So I've downloaded a program by a developer that macOS doesn't recognize, and when I want to run it I get the usual "we don't know who wrote it, would you like to trash it in one click?" warning. This is easy to bypass.

Instead of coming as one executable it's actually ~120 separate executables that the main one will call, or maybe they can call each other, and my computer will interrupt and quit the program every time it wants to call a new one. I would just grind through them if I thought that the program would call every one every run and I could clean them all up at once, but my guess is it's just going to call a handful at a time so I'll never know if I've gotten them all.

I ran ls -lha on the directory and they nearly all have the same output:

-rwxr-xr-x@   1 <user>  staff    92M Oct 29  2019 <name_of_exe>

a few are different, but there's no difference between the ones I've already approved and the ones I haven't.

After signing them with the command find . -name "*" -exec codesign --force -s - {} \;, the error message changes and it says:

Unable to open "<one_of_the_binaries>" because Apple could not check for malicious software.

This software needs to be updated. Contact the software developer for more information.

Firefox downloaded this file <time> from <site>.

After I go to the Privacy & Security menu to approve it, the next time I run the program I the the same warning, but now with the option to run anyway. But then when the next new executable is called, it will do the same thing with that one.

Is there some way I can quickely approve all of them at once?

MacOS 11.2.2.

1
  • If the answers in the suggested duplicate do not work – likely because of macOS 11 changes – please request to re-open this question! Commented Mar 23, 2021 at 19:14

1 Answer 1

0

You could ad-hoc code sign the applications using a shell script or another tool like Automator. The approximate command for each application is:

codesign --force -s - </path/to/application>

Please see the linked question for what this does and how the command is constructed.

2
  • Thanks Graham! I was able to sign all of the files with the line find . -name "*" -exec codesign --force -s - {} \; (see here for the one line command). This has changed the error message I get so now it says that it needs to be updated, but it's still the basically the same: The program quits and I have to approve each binary from the security settings one by one.
    – kyeh
    Commented Mar 23, 2021 at 17:59
  • 1
    Please can you update your question to include the exact text of the new error message. This will attract better answers. Commented Mar 23, 2021 at 18:37

Not the answer you're looking for? Browse other questions tagged .