Enable/Disable Default Gatekeeper Security in macOS

This change will add the “Anywhere” option for opening apps to the Security preference panel in macOS Sonoma and Sequoia, which is hidden by default otherwise.

sudo spctl --master-disable

You’ll see a confirmation reported back stating: “Globally disabling the assessment system needs to be confirmed in System Settings.”

To re-enable the default behaviour, use :

sudo spctl --master-enable