Malware warning
If you use a Mac, you have probably seen an alert window at some point saying something like:
"Apple could not verify that 'X' is free of malware..."
This happens because of a macOS security feature called Gatekeeper, which protects your computer by preventing unverified software or unknown files from running. Gatekeeper usually shows this warning when:
- The file has not been digitally signed by an Apple-verified developer
- The file was downloaded from the internet or transferred from another computer
- It is a file such as XML, a specific configuration file, or a file without an extension
What to do if you trust the file
You can bypass this protection individually for each file, which can become inconvenient if you regularly work with this type of file. If you know exactly where your files come from and fully trust them, there is an option to completely disable Gatekeeper, although this is not recommended for most users.
How to disable Gatekeeper completely
If you are absolutely sure that all your files are safe and no longer want to receive warnings, follow these steps:
- Open the Terminal application.
- Run the following command:
- Enter your administrator password when prompted.
Then go to System Settings > Privacy & Security.
You will now see the option to allow applications from any source:
"Allow applications downloaded from: Anywhere".
How to check the current Gatekeeper status
If you want to confirm whether Gatekeeper is enabled or disabled, run the following in Terminal:
How to re-enable Gatekeeper
If you want to turn this protection back on later, use the following command:
This will keep your Mac protected again with Apple’s recommended security safeguards.
Remember: Gatekeeper should only be disabled if you are sure the files are trustworthy and you understand what you are doing.