diff options
Diffstat (limited to 'recipes-compliance/scap-security-guide/files/0002-scap-security-guide-Add-Poky-support.patch')
-rw-r--r-- | recipes-compliance/scap-security-guide/files/0002-scap-security-guide-Add-Poky-support.patch | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/recipes-compliance/scap-security-guide/files/0002-scap-security-guide-Add-Poky-support.patch b/recipes-compliance/scap-security-guide/files/0002-scap-security-guide-Add-Poky-support.patch deleted file mode 100644 index 1639264..0000000 --- a/recipes-compliance/scap-security-guide/files/0002-scap-security-guide-Add-Poky-support.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From 2be977a60c944a54594d5786b2d8869ed72a9a06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Armin Kuster <akuster808@gmail.com> | ||
3 | Date: Wed, 5 Jul 2023 12:57:52 -0400 | ||
4 | Subject: [PATCH 2/2] scap-security-guide: Add Poky support | ||
5 | |||
6 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Waiting to see if OE changes get merged. | ||
10 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
11 | |||
12 | |||
13 | --- | ||
14 | products/openembedded/product.yml | 6 ++++ | ||
15 | shared/checks/oval/installed_OS_is_poky.xml | 33 +++++++++++++++++++++ | ||
16 | 2 files changed, 39 insertions(+) | ||
17 | create mode 100644 shared/checks/oval/installed_OS_is_poky.xml | ||
18 | |||
19 | diff --git a/products/openembedded/product.yml b/products/openembedded/product.yml | ||
20 | index debf6870ef..d63479d5d3 100644 | ||
21 | --- a/products/openembedded/product.yml | ||
22 | +++ b/products/openembedded/product.yml | ||
23 | @@ -17,3 +17,9 @@ cpes: | ||
24 | name: "cpe:/o:openembedded:nodistro:" | ||
25 | title: "OpenEmbedded nodistro" | ||
26 | check_id: installed_OS_is_openembedded | ||
27 | + | ||
28 | + - poky: | ||
29 | + name: "cpe:/o:openembedded:poky:" | ||
30 | + title: "OpenEmbedded Poky reference distribution" | ||
31 | + check_id: installed_OS_is_poky | ||
32 | + | ||
33 | diff --git a/shared/checks/oval/installed_OS_is_poky.xml b/shared/checks/oval/installed_OS_is_poky.xml | ||
34 | new file mode 100644 | ||
35 | index 0000000000..b8805cf31b | ||
36 | --- /dev/null | ||
37 | +++ b/shared/checks/oval/installed_OS_is_poky.xml | ||
38 | @@ -0,0 +1,33 @@ | ||
39 | +<def-group> | ||
40 | + <definition class="inventory" id="installed_OS_is_poky" version="1"> | ||
41 | + <metadata> | ||
42 | + <title>Poky</title> | ||
43 | + <affected family="unix"> | ||
44 | + <platform>multi_platform_all</platform> | ||
45 | + </affected> | ||
46 | + <description>The operating system installed is a Poky based System</description> | ||
47 | + </metadata> | ||
48 | + <criteria comment="System is Poky based distribution" operator="AND"> | ||
49 | + <extend_definition comment="Installed OS is part of the Unix family" definition_ref="installed_OS_is_part_of_Unix_family" /> | ||
50 | + <criterion comment="Poky based distro" test_ref="test_os_poky" /> | ||
51 | + <criterion comment="Poky based distribution is installed" test_ref="test_poky" /> | ||
52 | + </criteria> | ||
53 | + </definition> | ||
54 | + | ||
55 | + <unix:file_test check="all" check_existence="all_exist" comment="/etc/os-release exists" id="test_os_poky" version="1"> | ||
56 | + <unix:object object_ref="obj_os_poky" /> | ||
57 | + </unix:file_test> | ||
58 | + <unix:file_object comment="check /etc/os-release file" id="obj_os_poky" version="1"> | ||
59 | + <unix:filepath>/etc/os-release</unix:filepath> | ||
60 | + </unix:file_object> | ||
61 | + | ||
62 | + <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Check OpenEmbedded" id="test_poky" version="1"> | ||
63 | + <ind:object object_ref="obj_poky" /> | ||
64 | + </ind:textfilecontent54_test> | ||
65 | + <ind:textfilecontent54_object id="obj_poky" version="1" comment="Check Poky"> | ||
66 | + <ind:filepath>/etc/os-release</ind:filepath> | ||
67 | + <ind:pattern operation="pattern match">^ID=poky$</ind:pattern> | ||
68 | + <ind:instance datatype="int">1</ind:instance> | ||
69 | + </ind:textfilecontent54_object> | ||
70 | + | ||
71 | +</def-group> | ||
72 | -- | ||
73 | 2.34.1 | ||
74 | |||