Apple has an integrated way to protect you from opening potentially malicious applications on your computer in Mac OS X Lion, Mountain Lion, Mavericks, Yosemite, El Capitan and macOS Sierra.
This configuration, called Gatekeeper, will never prevent you from installing applications from the Mac App Store, but you can do it from anywhere else. If it is an application that you are sure you want to install on your system, here is how to do it.
Gatekeeper options selection
Open your System Preferences and go to Security and Privacy.
In the General tab, see a section called Allow application downloads. To change this setting, you must click on the lock icon below and enter your administrator password. Once that is out of the way, you can choose between three options:
- Mac App Store
- Mac App Store and developers identified
# 1: Only the Mac App Store
The safest option to choose here will be the Mac App Store, since Apple reviews all the applications that are accepted in your store and can quickly remove them if necessary. Basically, you will know that your Mac will be as free of malware as possible if you use this option only.
# 2: Mac App Store and trusted developers
The following option also relies on identified developer applications, which are basically developers with a unique Apple developer ID that have their applications digitally signed.
This is the option I use, since Apple can verify that there has been no manipulation of the applications since they were signed.
# 3: Apps from anywhere
The last option, Anywhere, obviously eliminates the Gatekeeper blocking capabilities on your Mac, allowing you to install and open any application outside the Internet, including Automator applications made by individuals.
Sometimes these things have malware, so I would recommend using the option of identified developers and a good installation of applications that do not have a developer ID on a case-by-case basis.
Trust applications on a case-by-case basis
If you have selected the Mac App Store option and identified developers, whenever you download an application without a developer ID and try to open it, you will receive the following warning.
- The application name cannot be opened because it comes from an unidentified developer
To avoid this restriction, select OK in the pop-up window to close it, then go to the Security & Privacy section of your System Preferences.
Below the Gatekeeper options in the General tab, see the application that has been locked to open it. To trust him, select Open anyway and you're done.
A shorter way to open them
If you do not want to enter the System Preferences to open an application for the first time as shown above, then simply click on Control + Click on the application in the Finder, then select Open.
You see a new pop-up window that will ask if you are sure you want to run the application on your Mac. You just have to press Open again and that's it.
Many thanks to Michael Cunningham for calling my attention to this trick in the comments that follow.
This is the best way to keep your Mac free of malware, while still downloading and using great applications that have not yet been signed.
This includes many Automator actions built by regular users to streamline a certain process, such as resizing images for the web automatically by simply dragging and dropping photos into the application.
If you create an Automator application yourself, Gatekeeper will not prevent you from opening it, since you have never downloaded it from the Internet, but anyone you get from us will.
For more information on how Gatekeeper works, see the Apple overview.