1. home
  2. security
  3. filevault-gatekeeper-and-xprotect-what-each-one-actually-stops
featured

FileVault, Gatekeeper and XProtect: what each one actually stops

Hana Sato Security 1 min read 12 comments 264 views

macOS security features are often lumped together, but they guard different doors. Knowing which is which tells you what you still need to handle yourself.

FileVault: a stolen laptop

FileVault encrypts the startup disk. It protects data on a Mac that is powered off. Once you are logged in, it does nothing against malware.

Gatekeeper: an unknown app

Gatekeeper checks that downloaded apps are signed and notarised before first launch. It is a first-run check, not an ongoing scanner.

XProtect: known malware

XProtect matches files against Apple's signature list and updates silently. It catches known families, not new ones.

  • Turn on FileVault and store the recovery key offline.
  • Do not disable Gatekeeper globally; allow single apps instead.
  • Keep automatic security updates on.
code
fdesetup status
spctl –status
system_profiler SPInstallHistoryDataType | grep -A2 XProtect

Unix is simple. It just takes a genius to understand its simplicity.

Dennis Ritchie

None of these protect you from a phishing page. A password manager that refuses to autofill on the wrong domain does.

$ cat /comments 12

T
Tom Brennan Aug 2, 2026 · 9:40 AM

This is exactly the write-up I needed this week. Bookmarked.

G
Grace Kim Aug 15, 2026 · 5:27 PM

Thanks for the correction, that saved me some head-scratching.

R
Ravi Menon Aug 3, 2026 · 6:43 PM

Tried this on an M1 Air and got the same numbers within a few percent.

A
Ana Ferreira Aug 20, 2026 · 9:50 PM

Same here, it made a big difference.

K
Kenji Mori Aug 22, 2026 · 8:04 AM

Thanks for the correction, that saved me some head-scratching.

O
Ola Nordmann Aug 10, 2026 · 6:17 AM

Any chance you could share the full config in a gist? The snippet is great but I want to see the rest.

A
Ana Ferreira Aug 13, 2026 · 2:08 AM

I have been doing this the hard way for years. Thank you.

F
Fatima Zahra Aug 18, 2026 · 3:41 AM

Worth mentioning that this behaves differently on Intel Macs. Took me an hour to figure that out.

S
Sofia Lind Aug 18, 2026 · 6:18 PM

Great post. One small correction: the flag is case-sensitive on older versions.

R
Ravi Menon Sep 1, 2026 · 11:04 PM

Followed along step by step and it worked first time, which never happens.

M
Marco Bellini Sep 9, 2026 · 1:48 AM

Does this survive a macOS point release? Mine broke after the last one.

S
Sofia Lind Sep 9, 2026 · 11:21 AM

Good question, I would like to know too.

$ echo "leave a comment"