id: os_messages_app_disable
title: Disable Messages App
discussion: |
  The macOS built-in Messages.app _MUST_ be disabled.

  The Messages.app establishes a connection to Apple's iCloud service, even when security controls to disable iCloud access have been put in place.

  [IMPORTANT]
  ====
  Apple has deprecated the use of link:https://github.com/apple/device-management/blob/eb51fb0cb9626cac4717858556912c257a734ce0/mdm/profiles/com.apple.applicationaccess.new.yaml#L67-L70[application restriction controls], using these controls may not work as expected. Third party software may be required to fulfill the compliance requirements.
  ====
check: |
  /usr/bin/osascript -l JavaScript << EOS
  function run() {
    let pref1 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess.new')\
    .objectForKey('familyControlsEnabled'))
    let pathlist = $.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess.new')\
    .objectForKey('pathBlackList').js
    for ( let app in pathlist ) {
        if ( ObjC.unwrap(pathlist[app]) == "/Applications/Messages.app" && pref1 == true ){
            return("true")
        }
    }
    return("false")
    }
  EOS
result:
  string: 'true'
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-95228-3
  cci:
    - N/A
  800-53r5:
    - AC-20
    - CM-7
    - CM-7(1)
  800-53r4:
    - CM-7
    - CM-7(1)
    - AC-20
  srg:
    - N/A
  disa_stig:
    - N/A
  800-171r3:
    - 03.01.20
    - 03.04.06
  cis:
    benchmark:
      - N/A
    controls v8:
      - 4.1
      - 4.8
  cmmc:
    - AC.L1-3.1.20
    - CM.L2-3.4.6
    - CM.L2-3.4.7
macOS:
  - '26.0'
tags:
  - cnssi-1253_low
  - cnssi-1253_high
  - cnssi-1253_moderate
severity: low
mobileconfig: true
mobileconfig_info:
  com.apple.applicationaccess.new:
    familyControlsEnabled: true
    pathBlackList:
      - /Applications/Messages.app
