sodcalculator

10 Tech How-To

Why macOS Blocks Downloads for Malware & Safe Override

Guide 10-57842 · Updated · Step by step

macOS automatically blocks downloads that it detects as malware to protect your Mac from harmful software. You can safely override this block when you are certain a file is legitimate, using the right-click (or Control-click) Open method or System Settings, after verifying the source. This article explains how macOS’s malware protection works, why it blocks certain files, and the safest ways to proceed when you trust a download.

How macOS Decides to Block a Download

macOS uses several layers of protection to evaluate downloaded files. The first is Gatekeeper, which checks whether an app is from the App Store or from identified developers. If an app isn’t signed with a valid Developer ID, Gatekeeper may block it by default. The second layer is XProtect, Apple’s built-in antivirus engine, which scans files for known malware signatures and patterns. Finally, Notarization requires developers to submit apps to Apple for a security check before distribution; the system verifies this notarization ticket when you first open the app.

When you download a file from the internet, macOS attaches a quarantine attribute (com.apple.quarantine) to it. This attribute tells the system to run Gatekeeper and XProtect checks before launching the file. If a file fails these checks, you see a warning like ““AppName” can’t be opened because Apple cannot check it for malicious software.”

Common Reasons for the Block

  • Unidentified developer: The app was not signed with an Apple-issued Developer ID, or the signature is missing.
  • Not notarized: The developer did not submit the app to Apple for notarization (common for open-source or small projects).
  • Malware detected: XProtect found a known threat, and the block is a hard stop—you should not try to override this.
  • Corrupted download: The file was incomplete or altered during download, breaking its signature.

The Safe Way to Override: Right-Click Open

When you are confident a blocked app is safe (e.g., you downloaded it directly from the developer’s official website), the safest override is:

  1. Locate the downloaded file in Finder (usually in the Downloads folder).
  2. Control-click (or right-click) the file and select Open from the context menu.
  3. In the dialog that appears, click Open again to confirm.

This method bypasses Gatekeeper for that single launch, but still runs XProtect. It is the least permissive override and is recommended by Apple for trusted apps that are not notarized.

Overriding via System Settings (For Persistent Use)

If you want to allow an app to open without the right-click workaround every time, you can add an exception in System Settings:

  1. Open System Settings (or System Preferences on older macOS) and go to Privacy & Security.
  2. Scroll down to the Security section. You will see a message about the blocked app, with an Open Anyway button.
  3. Click Open Anyway, then confirm in the pop-up dialog.

This permanently adds the app to the allowed list, but only for that specific app. It still does not disable Gatekeeper globally, so other unknown apps remain blocked.

When NOT to Override: Red Flags

  • If the warning says “will damage your computer” or “malware”, do not override—XProtect has flagged a known threat.
  • If the download came from a random website, torrent, or unsolicited email link, treat it as suspicious.
  • If the developer is unknown and the app demands admin privileges or accesses sensitive data (contacts, location, keychain), avoid it.

Overriding is only safe when you have a clear reason to trust the source, such as a well-known open-source project or a developer you have used before.

How to Check a File Before Opening

Before overriding, you can inspect the file:

  • Check the signature: In Terminal, run codesign -dv --verbose=4 /path/to/app to see the signing certificate. If it says “invalid signature” or “no signature,” proceed with caution.
  • Check the quarantine attribute: Run xattr -l /path/to/file to see if com.apple.quarantine is present. Removing it with xattr -d com.apple.quarantine /path/to/file disables Gatekeeper checks—but this is not recommended for most users.
  • Scan with a third-party antivirus: Run a reputable antivirus scanner on the file before opening.

Frequently Asked Questions

Q: Can I disable Gatekeeper entirely to stop all blocks?
A: Yes, you can disable it with the command sudo spctl --master-disable in Terminal, but this is strongly discouraged. It turns off all app signing checks, leaving your Mac vulnerable to any malware that slips past XProtect. Re-enable it with sudo spctl --master-enable.

Q: Why does my Mac block an app I downloaded from the App Store?
A: App Store apps are already notarized, so they rarely get blocked. If they do, the download may be corrupted. Try deleting and re-downloading from the App Store.

Q: What does “Apple cannot check it for malicious software” mean?
A: This means the app is not notarized, so Apple has not scanned it. It does not mean it is malware, but you should verify the source before opening.

Q: Is it safe to use the right-click Open method?
A: Yes, for trusted apps. It still runs XProtect, and you are making a conscious choice to bypass Gatekeeper. The risk is low if you know the file is legitimate.

Q: What if I accidentally override a malicious file?
A: Immediately quit the app, disconnect from the network, run a full antivirus scan, and consider restoring from a backup. You can also check Activity Monitor for suspicious processes.

Q: Does the override work for all file types?
A: The right-click Open method works for apps and some other executables. For scripts or archives, you may need to extract them first, and the same quarantine rules apply to the extracted contents.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →