Command: gatekeeper
Manage Gatekeeper, the macOS security feature that controls which applications are allowed to run.
Usage
Usage: m gatekeeper [OPTION] [ARGUMENTS]
Description: Manage Gatekeeper rules on macOS.
OPTIONS:
--help Show this help message and exit.
--status Show the current status of Gatekeeper.
--list List all Gatekeeper rules.
--enable Enable Gatekeeper
--disable Disable gatekeeper
--enable-rule RULE_NAME Enable a specific Gatekeeper rule.
--disable-rule RULE_NAME Disable a specific Gatekeeper rule.
--create-rule RULENAME /path/to/program Create a new Gatekeeper rule for the specified application.
Options
--status
Displays the current global status of Gatekeeper (enabled or disabled).
Example:
m gatekeeper --status
--enable
/ --disable
Globally enables or disables Gatekeeper. Disabling Gatekeeper can expose your system to security risks.
Example:
sudo m gatekeeper --disable
--list
Lists all custom Gatekeeper assessment rules.
Example:
m gatekeeper --list
--create-rule RULENAME /path/to/program
Creates a new rule to explicitly allow an application, bypassing Gatekeeper's standard checks. This is useful for unsigned applications from trusted developers.
Example:
sudo m gatekeeper --create-rule MyTrustedApp /Applications/MyTrustedApp.app
--enable-rule RULENAME
/ --disable-rule RULENAME
Toggles a specific custom rule on or off.
Example:
sudo m gatekeeper --disable-rule MyTrustedApp