Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"The grub2 boot loader superuser should have a username that is hard to guess.") }}}

<criteria operator="OR">
{{{ oval_file_absent_criterion(grub2_uefi_boot_path + "/grub.cfg") }}}
<criterion comment="Superuser is defined in {{{ grub2_uefi_boot_path }}}/grub.cfg and it
isn't root, admin, administrator nor equal to any system username"
test_ref="test_bootloader_uefi_superuser_differ_from_other_users"/>
Expand All @@ -20,8 +19,6 @@
<object_component item_field="username" object_ref="object_uefi_user_accounts"/>
</local_variable>

{{{ oval_file_absent(grub2_uefi_boot_path + "/grub.cfg") }}}

<ind:textfilecontent54_state id="state_bootloader_uefi_superuser_differ_from_other_users"
version="1">
<ind:subexpression datatype="string" operation="not equal" var_check="all"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,10 @@
{{{ oval_metadata("The UEFI grub2 boot loader should have password protection enabled.") }}}

<criteria operator="OR">
{{{ oval_file_absent_criterion(grub2_uefi_boot_path + "/grub.cfg") }}}
<criteria operator="AND">
<criteria comment="check both files to account for procedure change in documenation" operator="OR">
<criterion comment="make sure a password is defined in {{{ grub2_uefi_boot_path }}}/user.cfg" test_ref="test_grub2_uefi_password_usercfg" />
<criterion comment="make sure a password is defined in {{{ grub2_uefi_boot_path }}}/grub.cfg" test_ref="test_grub2_uefi_password_grubcfg" />
</criteria>
<criterion comment="make sure a superuser is defined in {{{ grub2_uefi_boot_path }}}/grub.cfg" test_ref="test_bootloader_uefi_superuser"/>
</criteria>
<criterion comment="make sure a password is defined in {{{ grub2_uefi_boot_path }}}/user.cfg" test_ref="test_grub2_uefi_password_usercfg" />
</criteria>
</definition>

{{{ oval_file_absent(grub2_uefi_boot_path + "/grub.cfg") }}}

<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="superuser is defined in {{{ grub2_uefi_boot_path }}}/grub.cfg." id="test_bootloader_uefi_superuser" version="2">
<ind:object object_ref="object_bootloader_uefi_superuser" />
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_bootloader_uefi_superuser" version="2">
<ind:filepath>{{{ grub2_uefi_boot_path }}}/grub.cfg</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*set[\s]+superusers=("?)[a-zA-Z_]+\1$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>


<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="make sure a password is defined in /boot/efi/EFI/redhat/user.cfg" id="test_grub2_uefi_password_usercfg" version="1">
<ind:object object_ref="object_grub2_uefi_password_usercfg" />
</ind:textfilecontent54_test>
Expand All @@ -34,12 +16,4 @@
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>

<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="make sure a password is defined in /boot/efi/EFI/redhat/grub.cfg" id="test_grub2_uefi_password_grubcfg" version="1">
<ind:object object_ref="object_grub2_uefi_password_grubcfg" />
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_grub2_uefi_password_grubcfg" version="1">
<ind:filepath>{{{ grub2_uefi_boot_path }}}/grub.cfg</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*password_pbkdf2[\s]+.*[\s]+grub\.pbkdf2\.sha512.*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
</def-group>

This file was deleted.

1 change: 1 addition & 0 deletions products/ol8/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pkg_version: "ad986da3"
release_key_fingerprint: "76FD3DB13AB67410B89DB10E82562EA9AD986DA3"

dconf_gdm_dir: "local.d"
grub2_uefi_boot_path: "/boot/efi/EFI/redhat"

oval_feed_url: "https://linux.oracle.com/security/oval/com.oracle.elsa-all.xml.bz2"

Expand Down