cis-dil-benchmark icon indicating copy to clipboard operation
cis-dil-benchmark copied to clipboard

cis-dil-benchmark-1.6.1.3 - selinux config `Policy from config file:\s+(targeted|mls)` changed to targeted in RH7

Open Bharathkumarraju opened this issue 5 years ago • 1 comments

Hi Team,

The cis-dil-benchmark-1.6.1.3 is checking and giving below error.

Actually it is checking for selinux config with Policy from config file:\s+(targeted|mls) but in RH7 it is changed to the +Loaded policy name: targeted needed a fix i guess.

Failure:
----------->
× cis-dil-benchmark-1.6.1.3: Ensure SELinux policy is configured (1 failed)
✔ File /etc/selinux/config content is expected to match /^SELINUXTYPE=(targeted|mls)\s*(?:#.*)?$/
× Command: `sestatus` stdout is expected to match /Policy from config file:\s+(targeted|mls)/
expected "SELinux status: enabled\nSELinuxfs mount: /sys/fs/selinux\nSELinux ro... enabled\nPolicy deny_unknown status: allowed\nMax kernel policy version: 31\n" to match /Policy from config file:\s+(targeted|mls)/
Diff:
@@ -1,9 +1,17 @@
-/Policy from config file:\s+(targeted|mls)/
+SELinux status: enabled
+SELinuxfs mount: /sys/fs/selinux
+SELinux root directory: /etc/selinux
+Loaded policy name: targeted
+Current mode: enforcing
+Mode from config file: enforcing
+Policy MLS status: enabled
+Policy deny_unknown status: allowed
+Max kernel policy version: 31

thanks, https://bharathkumaraju.com

Bharathkumarraju avatar Aug 23 '20 23:08 Bharathkumarraju

What is your proposed solution?

chris-rock avatar Aug 24 '20 07:08 chris-rock