Update RHEL 9 STIG to v2r8#14653
Conversation
|
Skipping CI for Draft Pull Request. |
|
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions'.
--- xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
+++ xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
@@ -19,10 +19,7 @@
device nodes. The /boot and /efi partitions are
excluded because they are special partitions usually handled by a
systemd mount unit, and enforcing nodev on them during
-operating system installation causes issues. Partitions with the
-vfat file system type are excluded because vfat does not
-support Unix device special files, so nodev enforcement on
-them is not meaningful.
+operating system installation causes issues.
[reference]:
11
OCIL for rule 'xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions' differs.
--- ocil:ssg-mount_option_nodev_nonroot_local_partitions_ocil:questionnaire:1
+++ ocil:ssg-mount_option_nodev_nonroot_local_partitions_ocil:questionnaire:1
@@ -1,6 +1,8 @@
-To verify the nodev option is configured for non-root local partitions, run the following command:
+To verify the nodev option is configured for non-root local partitions,
+run the following command:
$ sudo mount | grep '^/dev\S* on /\S' | grep --invert-match 'nodev'
-The output shows local non-root partitions mounted without the nodev option, and there should be no output at all.
+The output shows local non-root partitions mounted without the nodev option,
+and there should be no output at all.
Is it the case that some mounts appear among output lines?
bash remediation for rule 'xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions' differs.
--- xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
+++ xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
@@ -31,7 +31,6 @@
lustre
davfs
fuse.sshfs
- vfat
)
for partition_record in "${partitions_records[@]}"; do
@@ -86,8 +85,8 @@
fi
done
-# Remediate unmounted /etc/fstab entries, excluding /boot, /efi, and vfat partitions
-sed -i -E '/nodev/! { /^\s*(\/dev\/\S+|UUID=\S+)\s+\/(boot|efi)/! { /^\s*(\/dev\/\S+|UUID=\S+)\s+\/\w\S*\s+vfat\s/! s;^\s*(/dev/\S+|UUID=\S+)\s+(/\w\S*)\s+(\S+)\s+(\S+)(.*)$;\1 \2 \3 \4,nodev \5; } }' /etc/fstab
+# Remediate unmounted /etc/fstab entries, excluding /boot and /efi partitions
+sed -i -E '/nodev/! { /^\s*(\/dev\/\S+|UUID=\S+)\s+\/(boot|efi)/! s;^\s*(/dev/\S+|UUID=\S+)\s+(/\w\S*)\s+(\S+)\s+(\S+)(.*)$;\1 \2 \3 \4,nodev \5; }' /etc/fstab
else
>&2 echo 'Remediation is not applicable, nothing was done'
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions' differs.
--- xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
+++ xccdf_org.ssgproject.content_rule_mount_option_nodev_nonroot_local_partitions
@@ -64,7 +64,6 @@
- lustre
- davfs
- fuse.sshfs
- - vfat
when: ( not ( "kernel-core" in ansible_facts.packages and "rpm-ostree" in ansible_facts.packages
and "bootc" in ansible_facts.packages and not "openshift-kubelet" in ansible_facts.packages
and "ostree" in ansible_proc_cmdline ) and not ( ansible_virtualization_type in
@@ -122,11 +121,11 @@
- mount_option_nodev_nonroot_local_partitions
- no_reboot_needed
-- name: 'Add nodev Option to Non-Root Local Partitions: Ensure non-root local partitions
- are present with nodev option in /etc/fstab'
+- name: 'Add nodev Option to Non-Root Local Partitions: Ensure nodev option in /etc/fstab
+ for non-root local partitions'
ansible.builtin.replace:
path: /etc/fstab
- regexp: ^\s*(?!#)(/dev/\S+|UUID=\S+)\s+(/(?!boot|efi)\w\S*)\s+(?!vfat\s)(\S+)\s+(?!.*\bnodev\b)(\S+)(.*)$
+ regexp: ^\s*(?!#)(/dev/\S+|UUID=\S+)\s+(/(?!boot|efi)\w\S*)\s+(\S+)\s+(?!.*\bnodev\b)(\S+)(.*)$
replace: \1 \2 \3 \4,nodev \5
when: ( not ( "kernel-core" in ansible_facts.packages and "rpm-ostree" in ansible_facts.packages
and "bootc" in ansible_facts.packages and not "openshift-kubelet" in ansible_facts.packages
New content has different text for rule 'xccdf_org.ssgproject.content_rule_fapolicy_default_deny'.
--- xccdf_org.ssgproject.content_rule_fapolicy_default_deny
+++ xccdf_org.ssgproject.content_rule_fapolicy_default_deny
@@ -3,7 +3,9 @@
Configure Fapolicy Module to Employ a Deny-all, Permit-by-exception Policy to Allow the Execution of Authorized Software Programs.
[description]:
-The Fapolicy module must be configured to employ a deny-all, permit-by-exception policy to allow the execution of authorized software programs and to prevent unauthorized software from running.
+The Fapolicy module must be configured to employ a deny-all, permit-by-exception policy to
+allow the execution of authorized software programs and to prevent unauthorized software from
+running.
[reference]:
CM-7 (2)
@@ -30,12 +32,16 @@
SV-244546r1017349_rule
[rationale]:
-Utilizing a whitelist provides a configuration management method for allowing the execution of only authorized software.
-Using only authorized software decreases risk by limiting the number of potential vulnerabilities. Verification of whitelisted software occurs prior to execution or at system startup.
+Utilizing a whitelist provides a configuration management method for allowing the execution of
+only authorized software.
+Using only authorized software decreases risk by limiting the number of potential
+vulnerabilities.
+Verification of whitelisted software occurs prior to execution or at system startup.
Proceed with caution with enforcing the use of this daemon.
Improper configuration may render the system non-functional.
-The "fapolicyd" API is not namespace aware and can cause issues when launching or running containers.
+The "fapolicyd" API is not namespace aware and can cause issues when launching or running
+containers.
[ident]:
CCE-86478-5
OCIL for rule 'xccdf_org.ssgproject.content_rule_fapolicy_default_deny' differs.
--- ocil:ssg-fapolicy_default_deny_ocil:questionnaire:1
+++ ocil:ssg-fapolicy_default_deny_ocil:questionnaire:1
@@ -17,5 +17,8 @@
allow exe=/usr/bin/python3.7 : ftype=text/x-python
deny_audit perm=any pattern=ld_so : all
deny perm=any all : all
+
+Note: The "deny_log" and "deny_audit" actions also meet the security requirements as they deny
+execution while additionally providing logging.
Is it the case that fapolicyd is not running in enforcement mode with a deny-all, permit-by-exception policy?
|
|
@vojtapolasek you'll need to update the version number in both two profile files and in control file |
43d8b2d to
f6f73e9
Compare
|
@jan-cerny thanks, fixed. |
…tions this aligns with the latest STIG
The rule /home/vojta/repos/upstream/content/linux_os/guide/system/permissions/partitions/mount_option_boot_efi_nosuid no longer excludes vfat partitions.
… so it does not belong in the default
…s when sorting them
8332337 to
d6e47d4
Compare
|
@vojtapolasek: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description:
enable_fips_mode,enable_dracut_fips_module, andvar_system_crypto_policy=fips_stigfrom the STIG control, keeping onlysysctl_crypto_fips_enabledto align with the updated STIG requirement.fapolicy_default_deny): Update OVAL checks to also acceptdeny_loganddeny_auditkeywords in addition todeny, matching the updated STIG guidance. Update rule description and fixtext accordingly. Remove rule fromdefault.profilesince it is already present in the STIG profile.mount_option_boot_efi_nosuid): Remove the vfat filesystem exclusion since the updated STIG no longer exempts vfat partitions from the nosuid requirement. Update STIG checktext and test scenarios.mount_option_nodev_nonroot_local_partitions: Stop ignoring vfat partitions in OVAL, Bash, and Ansible remediations to align with the updated STIG. Update test scenarios accordingly.stigandstig_guiprofiles.Rationale:
Review Hints:
./build_product --datastream-only rhel9fapolicy_default_deny- OVAL regex change to acceptdeny_log/deny_auditmount_option_boot_efi_nosuid- vfat exclusion removed from template vars, test renamed from.pass.shto.fail.shmount_option_nodev_nonroot_local_partitions- vfat removed from OVAL regex, Bash sed, and Ansible regex/exclusion list