Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable anti-malware service xprotectservice on MacOS Catalina for CI

We recently upgraded our macmini from MacOS High Sierra to MacOS Catalina in order to compile with the latest Xcode. The macmini is a buildslave for continuous integration. After upgrading to Catalina I noticed the machine became very slow during git checkout of thousand of files due to the apples built-in anti-malware service "XProtectService".

We don't need the anti-malware service for CI as it slows down the compile process and no user will use the machine to download harmful files.

How can the XProtectService disabled?

like image 620
Paul Kiman Avatar asked Nov 06 '22 13:11

Paul Kiman


1 Answers

As said in the comments, you can disable XProtectService by rebooting in Recovery mode (cmd-R during boot) and running:

csrutil disable

but beware that this will disable the whole System Integrity Protection. Here is an Apple article: Disabling and Enabling System Integrity Protection, describing this procedure and providing the following warning:

Warning

Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.

like image 126
Ortomala Lokni Avatar answered Nov 13 '22 17:11

Ortomala Lokni