Compare commits

..

No commits in common. "c8" and "a8-beta" have entirely different histories.
c8 ... a8-beta

5 changed files with 80 additions and 80 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/openscap-1.3.13.tar.gz
SOURCES/openscap-1.3.7.tar.gz

View File

@ -1 +1 @@
3fad4a88243c254a23faacef8a246ba761d49697 SOURCES/openscap-1.3.13.tar.gz
238acbe6e18162b54cbdd0083c52511c00faa268 SOURCES/openscap-1.3.7.tar.gz

View File

@ -1,45 +0,0 @@
From 3a9fbd448ac18e50dfdf5a60af043cda7cdd63d0 Mon Sep 17 00:00:00 2001
From: Matthew Burket <mburket@redhat.com>
Date: Fri, 5 Dec 2025 09:12:43 -0600
Subject: [PATCH] Always check the current lists before inserting on blueprints
Fixes OpenSCAP#2282
---
src/XCCDF_POLICY/xccdf_policy_remediate.c | 2 +-
.../unittests/test_remediation_blueprint.xccdf.xml | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/XCCDF_POLICY/xccdf_policy_remediate.c b/src/XCCDF_POLICY/xccdf_policy_remediate.c
index 842ef2df9d..c7c02f0135 100644
--- a/src/XCCDF_POLICY/xccdf_policy_remediate.c
+++ b/src/XCCDF_POLICY/xccdf_policy_remediate.c
@@ -724,7 +724,7 @@ static inline int _parse_blueprint_fix(const char *fix_text, struct blueprint_cu
memcpy(val, &fix_text[ovector[2]], ovector[3] - ovector[2]);
val[ovector[3] - ovector[2]] = '\0';
- if (!oscap_list_contains(customizations->kernel_append, val, (oscap_cmp_func) oscap_streq)) {
+ if (!oscap_list_contains(tab[i].list, val, (oscap_cmp_func) oscap_streq)) {
oscap_list_prepend(tab[i].list, val);
} else {
free(val);
diff --git a/tests/API/XCCDF/unittests/test_remediation_blueprint.xccdf.xml b/tests/API/XCCDF/unittests/test_remediation_blueprint.xccdf.xml
index 2fc909795b..de3b8468a8 100644
--- a/tests/API/XCCDF/unittests/test_remediation_blueprint.xccdf.xml
+++ b/tests/API/XCCDF/unittests/test_remediation_blueprint.xccdf.xml
@@ -104,6 +104,16 @@ enabled = ["sshd"]
<fix system="urn:redhat:osbuild:blueprint">
[customizations.services]
masked = ["evil"]
+</fix>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5">
+ <check-content-ref href="test_remediation_simple.oval.xml" name="oval:moc.elpmaxe.www:def:1"/>
+ </check>
+ </Rule>
+ <Rule selected="true" id="xccdf_moc.elpmaxe.www_rule_11">
+ <title>Enable sshd</title>
+ <fix system="urn:redhat:osbuild:blueprint">
+[customizations.services]
+enabled = ["sshd"]
</fix>
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5">
<check-content-ref href="test_remediation_simple.oval.xml" name="oval:moc.elpmaxe.www:def:1"/>

View File

@ -0,0 +1,70 @@
diff -Naur openscap-1.3.3.orig/cpe/openscap-cpe-oval.xml openscap-1.3.3.alma/cpe/openscap-cpe-oval.xml
--- openscap-1.3.3.orig/cpe/openscap-cpe-oval.xml 2020-04-30 11:50:09.000000000 +0300
+++ openscap-1.3.3.alma/cpe/openscap-cpe-oval.xml 2021-03-22 13:12:12.069413537 +0300
@@ -133,6 +133,19 @@
<criterion comment="Oracle Linux 8 is installed" test_ref="oval:org.open-scap.cpe.ol:tst:8"/>
</criteria>
</definition>
+ <definition class="inventory" id="oval:org.open-scap.cpe.almalinux:def:8" version="1">
+ <metadata>
+ <title>AlmaLinux 8</title>
+ <affected family="unix">
+ <platform>AlmaLinux 8</platform>
+ </affected>
+ <reference ref_id="cpe:/o:almalinux:almalinux:8" source="CPE"/>
+ <description>The operating system installed on the system is AlmaLinux 8</description>
+ </metadata>
+ <criteria>
+ <criterion comment="AlmaLinux 8 is installed" test_ref="oval:org.open-scap.cpe.almalinux:tst:8"/>
+ </criteria>
+ </definition>
<definition class="inventory" id="oval:org.open-scap.cpe.rhel:def:1005" version="1">
<metadata>
<title>Community Enterprise Operating System 5</title>
@@ -828,6 +841,11 @@
<object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
<state state_ref="oval:org.open-scap.cpe.ol:ste:8"/>
</rpminfo_test>
+ <rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.almalinux:tst:8" version="1" check="at least one" comment="almalinux-release is version 8"
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <object object_ref="oval:org.open-scap.cpe.almalinux-release:obj:1"/>
+ <state state_ref="oval:org.open-scap.cpe.almalinux:ste:8"/>
+ </rpminfo_test>
<rpmverifyfile_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.rhel:tst:1005" version="1" check="at least one" comment="centos-release is version 5"
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
<object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
@@ -1165,6 +1183,9 @@
<rpminfo_object id="oval:org.open-scap.cpe.oraclelinux-release:obj:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
<name>oraclelinux-release</name>
</rpminfo_object>
+ <rpminfo_object id="oval:org.open-scap.cpe.almalinux-release:obj:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <name>almalinux-release</name>
+ </rpminfo_object>
<registry_object id="oval:org.open-scap.cpe.windows:obj:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows" >
<hive>HKEY_LOCAL_MACHINE</hive>
<key>SOFTWARE\Microsoft\Windows NT\CurrentVersion</key>
@@ -1233,6 +1254,10 @@
<name operation="pattern match">^oraclelinux-release</name>
<version operation="pattern match">^8</version>
</rpminfo_state>
+ <rpminfo_state id="oval:org.open-scap.cpe.almalinux:ste:8" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <name operation="pattern match">^almalinux-release</name>
+ <version operation="pattern match">^8</version>
+ </rpminfo_state>
<rpminfo_state id="oval:org.open-scap.cpe.fedora:ste:16" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
<version operation="pattern match">^16$</version>
</rpminfo_state>
diff -Naur openscap-1.3.5/cpe/openscap-cpe-dict.xml openscap-1.3.5.alma/cpe/openscap-cpe-dict.xml
--- openscap-1.3.5/cpe/openscap-cpe-dict.xml 2021-04-23 13:39:58.000000000 +0300
+++ openscap-1.3.5.alma/cpe/openscap-cpe-dict.xml 2021-10-10 10:02:27.000000000 +0300
@@ -37,6 +37,10 @@
<title xml:lang="en-us">Community Enterprise Operating System 8</title>
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.centos:def:8</check>
</cpe-item>
+ <cpe-item name="cpe:/o:almalinux:almalinux:8">
+ <title xml:lang="en-us">AlmaLinux 8</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.almalinux:def:8</check>
+ </cpe-item>
<cpe-item name="cpe:/o:fedoraproject:fedora:32">
<title xml:lang="en-us">Fedora 32</title>
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.fedora:def:32</check>

View File

@ -1,12 +1,15 @@
Name: openscap
Version: 1.3.13
Release: 1%{?dist}
Version: 1.3.7
Release: 1%{?dist}.alma
Summary: Set of open source libraries enabling integration of the SCAP line of standards
Group: System Environment/Libraries
License: LGPLv2+
URL: http://www.open-scap.org/
Source0: https://github.com/OpenSCAP/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
Patch0: 2284.patch
# Add AlmaLinux definitions
Patch100: openscap-1.3.5-almalinux.patch
BuildRequires: cmake >= 2.6
BuildRequires: swig libxml2-devel libxslt-devel perl-generators perl-XML-Parser
BuildRequires: rpm-devel
@ -135,12 +138,10 @@ cd build
%cmake -DENABLE_PERL=OFF \
-DENABLE_DOCS=ON \
-DENABLE_OSCAP_UTIL_DOCKER=OFF \
-DENABLE_OSCAP_UTIL_IM=OFF \
-DENABLE_OSCAP_UTIL_CHROOT=ON \
-DENABLE_OSCAP_UTIL_PODMAN=ON \
-DENABLE_OSCAP_UTIL_VM=ON \
-DENABLE_OSCAP_REMEDIATE_SERVICE=OFF \
-DOPENSCAP_PROBE_LINUX_DPKGINFO=OFF \
..
make %{?_smp_mflags}
make docs
@ -218,33 +219,8 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/oscap-run-sce-script
%changelog
* Mon Dec 08 2025 Matthew Burket <mburket@redhat.com> - 1.3.13-1
- Rebase to the latest upstream version (RHEL-133977)
- Add note that oscap xccdf eval --local-file only works with SCAP 1.3 data streams (RHEL-74343)
* Mon May 05 2025 Evgenii Kolesnikov <ekolesni@redhat.com> - 1:1.3.12-2
- Initialize tmt (RHEL-43240)
* Fri Apr 25 2025 Evgenii Kolesnikov <ekolesni@redhat.com> - 1:1.3.12-1
- Upgrade to the latest upstream release (RHEL-88842)
- Fix error when tailoring DISA content (RHEL-34104)
- Fix OSCAP_PROBE_IGNORE_PATHS handling (RHEL-67297)
* Wed Aug 07 2024 Milan Lysonek <mlysonek@redhat.com> - 1.3.10-3
- Switch gating to tmt plan (RHEL-43240)
* Mon Apr 08 2024 Jan Černý <jcerny@redhat.com> - 1.3.10-2
- Explicitely disable dpkginfo probe
* Tue Apr 02 2024 Jan Černý <jcerny@redhat.com> - 1.3.10-1
- Rebase to the latest upstream version (RHEL-31221)
- Add ability to define a limit of collected items (RHEL-11925)
- Add option --references that can select rules based on their reference (RHEL-1479)
* Fri Jul 14 2023 Evgenii Kolesnikov <ekolesni@redhat.com> - 1.3.8-1
- Upgrade to the latest upstream release (rhbz#2217441)
- Add offline support for sysctl probe (rhbz#2185791)
- Fix systemd* probes unit enumeration (rhbz#2219533)
* Wed Mar 29 2023 Eduard Abdullin <eabdullin@almalinux.org> - 1.3.7-1.alma
- AlmaLinux changes
* Fri Jan 27 2023 Jan Černý <jcerny@redhat.com> - 1.3.7-1
- Upgrade to the latest upstream release (rhbz#2159290)
@ -254,7 +230,6 @@ rm -rf $RPM_BUILD_ROOT
* Thu Jul 21 2022 Jan Černý <jcerny@redhat.com> - 1.3.6-4
- Fix potential invalid scan results in OpenSCAP (rhbz#2111040)
- Remove oscap-remediate service (rhbz#2111360)
* Wed Feb 02 2022 Jan Černý <jcerny@redhat.com> - 1.3.6-3
- Prevent fails of test_ds_misc.sh