diff --git a/scap-security-guide-0.1.74.tar.bz2 b/scap-security-guide-0.1.77.tar.bz2 similarity index 50% rename from scap-security-guide-0.1.74.tar.bz2 rename to scap-security-guide-0.1.77.tar.bz2 index 9cdb84445c3d4ac56666bc2ed9d8f99d864e8c67..a1c6f81dca0e921652f296244b9d1852e6a517d0 100644 Binary files a/scap-security-guide-0.1.74.tar.bz2 and b/scap-security-guide-0.1.77.tar.bz2 differ diff --git a/scap-security-guide.spec b/scap-security-guide.spec index 25880c8341e7f47df8b1a4a830c3bd4af1ec47c9..ee34aa727c355cd6b0ff367456495ee0a3f93d43 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -1,13 +1,15 @@ -%define anolis_release 1 +%define anolis_release 1 %global _vpath_builddir build Name: scap-security-guide -Version: 0.1.74 +Version: 0.1.77 Release: %{anolis_release}%{?dist} Summary: Security guidance and baselines in SCAP formats License: BSD URL: https://github.com/ComplianceAsCode/content/ -Source0: https://github.com/ComplianceAsCode/content/releases/download/v%{version}/scap-security-guide-%{version}.tar.bz2 +Source0: https://github.com/ComplianceAsCode/content/releases/download/v0.1.77/scap-security-guide-0.1.77.tar.bz2 +Patch1: scap-security-guide_0_1_78_fix_uefi_applicability_jinja.patch +Patch2: scap-security-guide_0_1_78_fix_wrong_grubmkconfig.patch BuildArch: noarch @@ -19,6 +21,7 @@ BuildRequires: python3-devel BuildRequires: python3-jinja2 BuildRequires: python3-PyYAML BuildRequires: python3-setuptools +BuildRequires: python3 Requires: xml-common, openscap-scanner >= 1.2.5 %description @@ -67,6 +70,11 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %doc %{_docdir}/%{name}/guides/*.html %changelog +* Fri Sep 12 2025 wenyuzifangtest001 - 0.1.77-1 +- Updated to version 0.1.77 to fix xxxxxx +- Fix YAML parsing, ensure correct platform key recognition, and maintain proper rule evaluation +- Apply patch to ensure accurate GRUB2 configuration on RHEL systems and prevent command errors + * Wed Feb 19 2025 Chang Gao - 0.1.74-1 - Update to 0.1.74 - Remove patch which already exist in upstream diff --git a/scap-security-guide_0_1_78_fix_uefi_applicability_jinja.patch b/scap-security-guide_0_1_78_fix_uefi_applicability_jinja.patch new file mode 100644 index 0000000000000000000000000000000000000000..ddfe4078dfbb71c765786325283875b0aee139f7 --- /dev/null +++ b/scap-security-guide_0_1_78_fix_uefi_applicability_jinja.patch @@ -0,0 +1,42 @@ +From 884ccb32e27aca7e3a4b0af841ddd5ecba81ae67 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= +Date: Thu, 19 Jun 2025 14:40:17 +0200 +Subject: [PATCH] Remove excess dashes in Jinja 2 expression + +These dashes consume all surrounding namespaces. As a result, +the platform key isn't taken as a key but becomes part of the +description value. +--- + linux_os/guide/system/bootloader-grub2/non-uefi/group.yml | 4 ++-- + linux_os/guide/system/bootloader-grub2/uefi/group.yml | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/linux_os/guide/system/bootloader-grub2/non-uefi/group.yml b/linux_os/guide/system/bootloader-grub2/non-uefi/group.yml +index 2a79674b363..67c0612649c 100644 +--- a/linux_os/guide/system/bootloader-grub2/non-uefi/group.yml ++++ b/linux_os/guide/system/bootloader-grub2/non-uefi/group.yml +@@ -5,6 +5,6 @@ title: 'Non-UEFI GRUB2 bootloader configuration' + description: |- + Non-UEFI GRUB2 bootloader configuration + +-{{%- if grub2_boot_path != grub2_uefi_boot_path -%}} ++{{% if grub2_boot_path != grub2_uefi_boot_path -%}} + platform: non-uefi +-{{%- endif -%}} ++{{%- endif %}} +diff --git a/linux_os/guide/system/bootloader-grub2/uefi/group.yml b/linux_os/guide/system/bootloader-grub2/uefi/group.yml +index 08f2e4ad9d0..b9516b94403 100644 +--- a/linux_os/guide/system/bootloader-grub2/uefi/group.yml ++++ b/linux_os/guide/system/bootloader-grub2/uefi/group.yml +@@ -5,9 +5,9 @@ title: 'UEFI GRUB2 bootloader configuration' + description: |- + UEFI GRUB2 bootloader configuration + +-{{%- if grub2_boot_path != grub2_uefi_boot_path -%}} ++{{% if grub2_boot_path != grub2_uefi_boot_path -%}} + platform: uefi +-{{%- endif -%}} ++{{%- endif %}} + + warnings: + - functionality: |- diff --git a/scap-security-guide_0_1_78_fix_wrong_grubmkconfig.patch b/scap-security-guide_0_1_78_fix_wrong_grubmkconfig.patch new file mode 100644 index 0000000000000000000000000000000000000000..70471c9b67eeb4be8601c0c01223aa8639cad0b6 --- /dev/null +++ b/scap-security-guide_0_1_78_fix_wrong_grubmkconfig.patch @@ -0,0 +1,101 @@ +From 0e0667783e9901f898af637c00464217654fcf9e Mon Sep 17 00:00:00 2001 +From: vojtapolasek +Date: Fri, 27 Jun 2025 13:53:28 +0200 +Subject: [PATCH] replace instances of grub-mkconfig with correct + grub2-mkconfig + +--- + .../bootloader-grub2/non-uefi/grub2_admin_username/rule.yml | 4 ++-- + .../system/bootloader-grub2/non-uefi/grub2_password/rule.yml | 4 ++-- + .../bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml | 4 ++-- + .../system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_admin_username/rule.yml b/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_admin_username/rule.yml +index 20c824cd0b6..53baf2b128a 100644 +--- a/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_admin_username/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_admin_username/rule.yml +@@ -23,7 +23,7 @@ description: |- + update the + grub.cfg file by running: + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +@@ -85,7 +85,7 @@ fixtext: |- + Once the superuser account has been added, update the grub.cfg file by running: + + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +diff --git a/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_password/rule.yml b/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_password/rule.yml +index cf660bff13e..326cfda1a84 100644 +--- a/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_password/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/non-uefi/grub2_password/rule.yml +@@ -28,7 +28,7 @@ description: |- + update the + grub.cfg file by running: + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +@@ -111,7 +111,7 @@ fixtext: |- + Once the superuser account has been added, update the grub.cfg file by running: + + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml +index ad52e7797e1..451537e032f 100644 +--- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_admin_username/rule.yml +@@ -23,7 +23,7 @@ description: |- + update the + grub.cfg file by running: + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +@@ -89,7 +89,7 @@ fixtext: |- + Once the superuser account has been added, update the grub.cfg file by running: + + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +diff --git a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml +index 357c2e8defa..0d75ba87338 100644 +--- a/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml ++++ b/linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/rule.yml +@@ -28,7 +28,7 @@ description: |- + update the + grub.cfg file by running: + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}} +@@ -109,7 +109,7 @@ fixtext: |- + Then, update the grub.cfg file by running: + + {{%- if "rhel" in product %}} +-
grub-mkconfig -o /boot/grub2/grub.cfg
++
grub2-mkconfig -o /boot/grub2/grub.cfg
+ {{%- else %}} +
{{{ grub_command("update") }}}
+ {{%- endif %}}