Skip to content

Rule File Layout

A rule file defines a single security control for macOS. Each rule is written in YAML and must follow the structure below.


FieldDescription
idUnique identifier matching the filename (without .yaml)
titleHuman-readable title for the rule
discussionDescription of the rule’s intent and context
checkShell command or script to validate compliance
resultExpected result from the check
fixRemediation steps or configuration to enforce the rule
tagsKeywords for categorizing and filtering rules

FieldDescription
referencesMappings to CCEs, security frameworks, and controls
macOSmacOS versions this rule is validated for
odvOrganization Defined Values with hint and defaults
severitySeverity level (low, medium, high)
mobileconfigSet to true if enforceable via configuration profile
mobileconfig_infoConfiguration profile payload (required if mobileconfig is true)
ddm_infoDDM configuration declaration (for DDM-supported settings)

The references field maps to various compliance frameworks:

KeyFramework
cceCommon Configuration Enumeration
cciControl Correlation Identifier
800-53r5NIST SP 800-53 Rev 5
800-53r4NIST SP 800-53 Rev 4
800-171r3NIST SP 800-171 Rev 3
srgSecurity Requirements Guide
disa_stigDISA STIG identifiers
cisCIS Benchmarks and Controls
cmmcCMMC level mappings

id: system_settings_bluetooth_disable
title: Disable Bluetooth When no Approved Device is Connected
discussion: |
The macOS system _MUST_ be configured to disable Bluetooth unless
there is an approved device connected.
check: |
/usr/bin/osascript -l JavaScript << EOS
$.NSUserDefaults.alloc.initWithSuiteName('com.apple.MCXBluetooth')\
.objectForKey('DisableBluetooth').js
EOS
result:
string: 'true'
fix: |
This is implemented by a Configuration Profile.
references:
cce:
- CCE-94352-2
800-53r5:
- AC-18
- SC-8
disa_stig:
- APPL-15-002062
macOS:
- '15.0'
tags:
- 800-53r5_moderate
- 800-53r5_high
- stig
severity: high
mobileconfig: true
mobileconfig_info:
com.apple.ManagedClient.preferences:
com.apple.MCXBluetooth:
DisableBluetooth: true