id: system_settings_screensaver_password_enforce
title: Enforce Screen Saver Password
discussion: |
  Users _MUST_ authenticate when unlocking the screen saver.

  The screen saver acts as a session lock and prevents unauthorized users from accessing the current user's account.
check: |
  /usr/bin/osascript -l JavaScript << EOS
  $.NSUserDefaults.alloc.initWithSuiteName('com.apple.screensaver')\
  .objectForKey('askForPassword').js
  EOS
result:
  string: 'true'
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-94389-4
  cci:
    - CCI-000056
  800-53r5:
    - AC-11
  800-53r4:
    - AC-11
  srg:
    - SRG-OS-000028-GPOS-00009
  disa_stig:
    - APPL-15-000002
  800-171r3:
    - 03.01.10
    - 03.05.01
  cmmc:
    - AC.L2-3.1.10
  bio:
    - 5.17.03
macOS:
  - '15.0'
tags:
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-53r4_moderate
  - 800-53r4_high
  - 800-171
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - stig
  - cnssi-1253_moderate
  - nlmapgov_plus
severity: medium
mobileconfig: true
mobileconfig_info:
  com.apple.screensaver:
    askForPassword: true
