id: os_erase_content_and_settings_disable
title: Disable Erase Content and Settings
discussion: |
  Erase Content and Settings _MUST_ be disabled.
check: |
  /usr/bin/osascript -l JavaScript << EOS
  $.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess')\
  .objectForKey('allowEraseContentAndSettings').js
  EOS
result:
  string: 'false'
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-95185-5
  cci:
    - CCI-000366
    - CCI-000381
  800-53r5:
    - CM-7
    - CM-7(1)
  800-53r4:
    - CM-7
    - CM-7(1)
  srg:
    - SRG-OS-000480-GPOS-00227
    - SRG-OS-000095-GPOS-00049
  disa_stig:
    - APPL-26-005061
  cmmc:
    - CM.L2-3.4.6
    - CM.L2-3.4.7
  800-171r3:
    - 03.04.06
macOS:
  - '26.0'
tags:
  - 800-171
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - stig
  - cnssi-1253_moderate
severity: medium
mobileconfig: true
mobileconfig_info:
  com.apple.applicationaccess:
    allowEraseContentAndSettings: false
