Skip to content

New OrgScore 6_3_6 #32

@phu-ngo

Description

@phu-ngo

https://github.com/usnistgov/macos_security/blob/main/rules/os/os_safari_advertising_privacy_protection_enable.yaml
Can we add new OrgScore 6.3.6?


#!/bin/zsh
# shellcheck shell=bash

script_dir=$(dirname ${0:A})
projectfolder=$(dirname $script_dir)

source "${projectfolder}/Header.sh"

CISLevel="1"
audit="6.3.6 Ensure Advertising Privacy Protection in Safari Is Enabled (Automated)"
orgScore="OrgScore6_3_6"
emptyVariables
# Verify organizational score
runAudit
# If organizational score is 1 or true, check status of client
if [[ "${auditResult}" == "1" ]]; then
	method="Profile"
	remediate="Configuration profile - payload > com.apple.Safari > WebKitPreferences.privateClickMeasurementEnabled=true"

	appidentifier="com.apple.Safari"
	value="WebKitPreferences.privateClickMeasurementEnabled"
	prefValue=$(getPrefValuerunAsUser "${appidentifier}" "${value}")
	prefIsManaged=$(getPrefIsManagedrunAsUser "${appidentifier}" "${value}")
	comment="Advertising Privacy Protection in Safari Is Enabled"
	if [[ "${prefIsManaged}" == "true" && "${prefValue}" == "false" ]]; then
		result="Passed"
	else
		if [[ "${prefValue}" == "false" ]]; then
			result="Passed"
		else
			result="Failed"
			comment="Advertising Privacy Protection in Safari Is Disabled"
		fi
	fi
fi
printReport

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions