os_safari_allow_javascript_disable Disable JavaScript in Safari
NIST macOS Security Compliance Project Tahoe Guidance, Revision 3.0 (cf656e8)
All changes in this version
All changes in this version
Title
Disable JavaScript in Safari
Control
/usr/bin/osascript -l JavaScript << EOS
$.NSUserDefaults.alloc.initWithSuiteName('com.apple.Safari')\
.objectForKey('allowJavaScript').js
EOS
Discussion
Safari JavaScript execution _MUST_ be disabled.
JavaScript is a powerful scripting language that can be leveraged by malicious content to execute arbitrary code in the context of the browser, redirect users to malicious sites, or exfiltrate sensitive information. Disabling JavaScript reduces the attack surface associated with active mobile code in the web browser.
Related controls
sc-18, sc-18.4
Fix
This is implemented by a Configuration Profile.