Protect your Mac from malware
macOS has many features that help protect your Mac and your personal information from malicious software, or malware. One common way malware is distributed is by embedding it in a harmless-looking app.
You can reduce this risk by using software only from reliable sources. Privacy & Security settings allow you to specify the sources of software installed on your Mac.
On your Mac, choose Apple menu > System Settings, then click Privacy & Security in the sidebar. (You may need to scroll down.)
Go to Security, click the pop-up menu next to “Allow applications from,” then choose the sources that you allow apps to be installed from:
App Store: Allows apps only from the Mac App Store. This is the most secure setting to protect your system from malware. All the developers of apps in the Mac App Store are known by Apple, and each app is reviewed before it’s accepted. macOS checks the app before it opens the first time to be certain it hasn’t been modified since the developer shipped it. If there’s ever a problem with an app, Apple removes it from the Mac App Store.
App Store and Known Developers: Allows apps from the Mac App Store and apps from known developers. Known developers are registered with Apple and can optionally upload their apps to Apple for a security check. If problems occur with an app, Apple can revoke its authorization. macOS checks the app before it opens the first time to be certain it hasn’t been modified since the developer shipped it.
In addition to apps, other types of files may not be safe. Scripts, web archives, and Java archives have the potential to harm to your system. You should exercise caution when opening any such downloaded file. An alert appears when you first try to open these files. See Open an app by overriding security settings.