The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
#!/bin/bash
# Reconstructed from oval:mil.disa.stig.solaris11:def:110
# Audit records must include when (date and time) the events occurred.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
#
# MANUAL REVIEW REQUIRED -- the module(s) below could not be reconstructed
# into working code from curated SCC reference data, and are excluded from
# the automated result:
# - uname_object (uname_test) -- OS version is less than 11.4: no extractor for field "os_version"
# - uname_object (uname_test) -- OS version is not less than 11.4: no extractor for field "os_version"
# /etc/zones/index does not exist
# file_object (file_test)
test_2() {
! ( test -e '/etc/zones/index' &>/dev/null )
}
# /etc/zones/index contains global
# textfilecontent54_object (textfilecontent54_test)
test_3() {
grep -Pq '^global:' '/etc/zones/index' &>/dev/null
}
# /var/share/zones/index.json does not exist
# file_object (file_test)
test_5() {
! ( test -e '/var/share/zones/index.json' &>/dev/null )
}
# /var/share/zones/index.json does not contain 'path:/'
# textfilecontent54_object (textfilecontent54_test)
test_6() {
! ( grep -Pq '"path":\s+"/"' '/var/share/zones/index.json' &>/dev/null )
}
# auditd is online
# smf_object (smf_test)
test_7() {
(svcs -H -o state 'svc://localhost/system/auditd:default') | grep -qxF 'ONLINE'
}
if ( ( ( test_2 || test_3 ) && ( test_5 || test_6 ) ) || test_7 ); then
echo "PASS (automated portion only -- MANUAL REVIEW still required, see notes above)"
else
echo "FAIL (or see MANUAL REVIEW note above)"
fi Assessment Script Powered by AISandbox-executed
A standalone Shell script to assess this control automatically. Review before running it in your environment.
Syntax-checked and actually executed in an isolated sandbox (not the real system this checks) — confirmed to run without errors.
#!/bin/sh
# OVAL Definition: oval:mil.disa.stig.solaris11:def:110
if [ "$(zonename 2>/dev/null)" = "global" ]; then \
uname -r | grep -q "^11(\.[0-3])$" || exit 1; \
[ ! -f /etc/zones/index ] || (grep -q "^global:" /etc/zones/index && grep -q "1" /etc/zones/index) || exit 1; \
[ ! -f /var/share/zones/index.json ] || ! grep -q "\"path\":\"/\"" /var/share/zones/index.json || exit 1; \
echo "PASS"; \
else \
echo "PASS"; \
fi
exit 0