adamwill / rpms / openscap

Forked from rpms/openscap 3 years ago
Clone

Blame SOURCES/openscap-1.2.18-rhel8-cpe.patch

914530
From d4703574010bb573286701b08812ee4200ff18c0 Mon Sep 17 00:00:00 2001
914530
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
914530
Date: Thu, 9 Aug 2018 04:20:42 -0400
914530
Subject: [PATCH] Add RHEL8 CPE to OpenSCAP CPE dictionary
914530
914530
---
914530
 cpe/openscap-cpe-dict.xml |  4 ++++
914530
 cpe/openscap-cpe-oval.xml | 22 ++++++++++++++++++++++
914530
 2 files changed, 26 insertions(+)
914530
914530
diff --git a/cpe/openscap-cpe-dict.xml b/cpe/openscap-cpe-dict.xml
914530
index 277be121c..1d4dbfebc 100644
914530
--- a/cpe/openscap-cpe-dict.xml
914530
+++ b/cpe/openscap-cpe-dict.xml
914530
@@ -17,6 +17,10 @@
914530
             <title xml:lang="en-us">Red Hat Enterprise Linux 7</title>
914530
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:7</check>
914530
       </cpe-item>
914530
+      <cpe-item name="cpe:/o:redhat:enterprise_linux:8">
914530
+            <title xml:lang="en-us">Red Hat Enterprise Linux 8</title>
914530
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:8</check>
914530
+      </cpe-item>
914530
       <cpe-item name="cpe:/o:oracle:linux:5">
914530
             <title xml:lang="en-us">Oracle Linux 5</title>
914530
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.ol:def:5</check>
914530
diff --git a/cpe/openscap-cpe-oval.xml b/cpe/openscap-cpe-oval.xml
914530
index bfb0b8336..b2a7d18ae 100644
914530
--- a/cpe/openscap-cpe-oval.xml
914530
+++ b/cpe/openscap-cpe-oval.xml
914530
@@ -68,6 +68,19 @@
914530
                          </criteria>
914530
                   </criteria>
914530
             </definition>
914530
+            <definition class="inventory" id="oval:org.open-scap.cpe.rhel:def:8" version="1">
914530
+                  <metadata>
914530
+                        <title>Red Hat Enterprise Linux 8</title>
914530
+                        <affected family="unix">
914530
+                              <platform>Red Hat Enterprise Linux 8</platform>
914530
+                        </affected>
914530
+                        <reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
914530
+                        <description>The operating system installed on the system is Red Hat Enterprise Linux 8</description>
914530
+                  </metadata>
914530
+                  <criteria>
914530
+                        <criterion comment="Red Hat Enterprise Linux 8 is installed" test_ref="oval:org.open-scap.cpe.rhel:tst:8"/>
914530
+                  </criteria>
914530
+            </definition>
914530
             <definition class="inventory" id="oval:org.open-scap.cpe.ol:def:5" version="1">
914530
                   <metadata>
914530
                         <title>Oracle Linux 5</title>
914530
@@ -633,6 +646,11 @@
914530
                   <object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
914530
                   <state state_ref="oval:org.open-scap.cpe.rhel:ste:7"/>
914530
             </rpmverifyfile_test>
914530
+            
914530
+                  xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
914530
+                  <object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
914530
+                  <state state_ref="oval:org.open-scap.cpe.rhel:ste:8"/>
914530
+            </rpmverifyfile_test>
914530
             
914530
                   xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
914530
                   <object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
914530
@@ -939,6 +957,10 @@
914530
                   <name operation="pattern match">^redhat-release</name>
914530
                   <version operation="pattern match">^7[^\d]</version>
914530
             </rpmverifyfile_state>
914530
+            <rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:8" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
914530
+                  <name operation="pattern match">^redhat-release</name>
914530
+                  <version operation="pattern match">^8[^\d]</version>
914530
+            </rpmverifyfile_state>
914530
             <rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:1005" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
914530
                   <name operation="pattern match">^centos-release</name>
914530
                   <version operation="pattern match">^5</version>