Add macOS CIS 6.1.1 (Show All Filename Extensions) (#9740)

This adds CIS 6.1.1
---------
Co-authored-by: Sharon Katz <sharon@fleetdm.com>
Approved by: Sharon Katz <sharon@fleetdm.com>
This commit is contained in:
Artemis Tosini 2023-02-08 10:51:42 -05:00 committed by GitHub
parent 086ec05ca7
commit b6968892b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 1 deletions

View file

@ -1508,4 +1508,35 @@ spec:
);
purpose: Informational
tags: compliance, CIS, CIS_Level1, CIS5.7
contributors: lucasmrod
contributors: lucasmrod
---
apiVersion: v1
kind: policy
spec:
name: CIS - Ensure Show All Filename Extensions Setting is Enabled
platforms: macOS
platform: darwin
description: |
A filename extension is a suffix added to a base filename that indicates the base filename's
file format. Visible filename extensions allow the user to identify the file type and the
application it is associated with which leads to quick identification of misrepresented malicious files.
resolution: |
Automated method:
Ask your system administrator to deploy a script that will ensure Show All Filename Extensions Setting is Enabled
For each user run:
/usr/bin/sudo -u <username> /usr/bin/defaults write /Users/<username>/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true
query: |
SELECT 1 WHERE NOT EXISTS (
SELECT 1 FROM users AS u
LEFT JOIN (
SELECT * FROM plist WHERE
path LIKE '/Users/%/Library/Preferences/.GlobalPreferences.plist' AND
key = 'AppleShowAllExtensions' AND
value = '1') AS p
ON p.path = CONCAT(u.directory, '/Library/Preferences/.GlobalPreferences.plist')
WHERE u.directory LIKE '/Users/%' AND
p.value IS NULL
);
purpose: Informational
tags: compliance, CIS, CIS_Level1, CIS6.1.1
contributors: artemist-work

View file

@ -0,0 +1,5 @@
#!/bin/bash
# For QA: Replace <username> with your test user
/usr/bin/sudo -u <username> /usr/bin/defaults write /Users/<username>/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true