scap-security-guide: Drop Poky patch and update to tip

The Poky patch has been accepted.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2023-09-12 11:10:39 -04:00
parent 4f79979c54
commit aca6d4a9e7
2 changed files with 1 additions and 76 deletions

View File

@@ -1,74 +0,0 @@
From 2be977a60c944a54594d5786b2d8869ed72a9a06 Mon Sep 17 00:00:00 2001
From: Armin Kuster <akuster808@gmail.com>
Date: Wed, 5 Jul 2023 12:57:52 -0400
Subject: [PATCH 2/2] scap-security-guide: Add Poky support
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Upstream-Status: Pending
Waiting to see if OE changes get merged.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
products/openembedded/product.yml | 6 ++++
shared/checks/oval/installed_OS_is_poky.xml | 33 +++++++++++++++++++++
2 files changed, 39 insertions(+)
create mode 100644 shared/checks/oval/installed_OS_is_poky.xml
diff --git a/products/openembedded/product.yml b/products/openembedded/product.yml
index debf6870ef..d63479d5d3 100644
--- a/products/openembedded/product.yml
+++ b/products/openembedded/product.yml
@@ -17,3 +17,9 @@ cpes:
name: "cpe:/o:openembedded:nodistro:"
title: "OpenEmbedded nodistro"
check_id: installed_OS_is_openembedded
+
+ - poky:
+ name: "cpe:/o:openembedded:poky:"
+ title: "OpenEmbedded Poky reference distribution"
+ check_id: installed_OS_is_poky
+
diff --git a/shared/checks/oval/installed_OS_is_poky.xml b/shared/checks/oval/installed_OS_is_poky.xml
new file mode 100644
index 0000000000..b8805cf31b
--- /dev/null
+++ b/shared/checks/oval/installed_OS_is_poky.xml
@@ -0,0 +1,33 @@
+<def-group>
+ <definition class="inventory" id="installed_OS_is_poky" version="1">
+ <metadata>
+ <title>Poky</title>
+ <affected family="unix">
+ <platform>multi_platform_all</platform>
+ </affected>
+ <description>The operating system installed is a Poky based System</description>
+ </metadata>
+ <criteria comment="System is Poky based distribution" operator="AND">
+ <extend_definition comment="Installed OS is part of the Unix family" definition_ref="installed_OS_is_part_of_Unix_family" />
+ <criterion comment="Poky based distro" test_ref="test_os_poky" />
+ <criterion comment="Poky based distribution is installed" test_ref="test_poky" />
+ </criteria>
+ </definition>
+
+ <unix:file_test check="all" check_existence="all_exist" comment="/etc/os-release exists" id="test_os_poky" version="1">
+ <unix:object object_ref="obj_os_poky" />
+ </unix:file_test>
+ <unix:file_object comment="check /etc/os-release file" id="obj_os_poky" version="1">
+ <unix:filepath>/etc/os-release</unix:filepath>
+ </unix:file_object>
+
+ <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Check OpenEmbedded" id="test_poky" version="1">
+ <ind:object object_ref="obj_poky" />
+ </ind:textfilecontent54_test>
+ <ind:textfilecontent54_object id="obj_poky" version="1" comment="Check Poky">
+ <ind:filepath>/etc/os-release</ind:filepath>
+ <ind:pattern operation="pattern match">^ID=poky$</ind:pattern>
+ <ind:instance datatype="int">1</ind:instance>
+ </ind:textfilecontent54_object>
+
+</def-group>
--
2.34.1

View File

@@ -6,11 +6,10 @@ HOME_URL = "https://www.open-scap.org/security-policies/scap-security-guide/"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9bfa86579213cb4c6adaffface6b2820"
LICENSE = "BSD-3-Clause"
SRCREV = "d09e81ae00509a9be4b01359166cfbece06e47f4"
SRCREV = "da283b9a360f2f42ad642c0c9b08b061501bc667"
SRC_URI = "git://github.com/ComplianceAsCode/content.git;branch=master;protocol=https \
file://run_eval.sh \
file://run-ptest \
file://0002-scap-security-guide-Add-Poky-support.patch \
"