Skip to content

Commit 3881f44

Browse files
committed
scap-security-guide: Add Poky support
Signed-off-by: Armin Kuster <[email protected]>
1 parent 08cbf2e commit 3881f44

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

products/openembedded/product.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ cpes:
1717
name: "cpe:/o:openembedded:nodistro:"
1818
title: "OpenEmbedded nodistro"
1919
check_id: installed_OS_is_openembedded
20+
21+
- poky:
22+
name: "cpe:/o:openembedded:poky:"
23+
title: "OpenEmbedded Poky reference distribution"
24+
check_id: installed_OS_is_poky
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<def-group>
2+
<definition class="inventory" id="installed_OS_is_poky" version="1">
3+
<metadata>
4+
<title>Poky</title>
5+
<affected family="unix">
6+
<platform>multi_platform_all</platform>
7+
</affected>
8+
<description>The operating system installed is a Poky based System</description>
9+
</metadata>
10+
<criteria comment="System is Poky based distribution" operator="AND">
11+
<extend_definition comment="Installed OS is part of the Unix family" definition_ref="installed_OS_is_part_of_Unix_family" />
12+
<criterion comment="Poky based distro" test_ref="test_os_poky" />
13+
<criterion comment="Poky based distribution is installed" test_ref="test_poky" />
14+
</criteria>
15+
</definition>
16+
17+
<unix:file_test check="all" check_existence="all_exist" comment="/etc/os-release exists" id="test_os_poky" version="1">
18+
<unix:object object_ref="obj_os_poky" />
19+
</unix:file_test>
20+
<unix:file_object comment="check /etc/os-release file" id="obj_os_poky" version="1">
21+
<unix:filepath>/etc/os-release</unix:filepath>
22+
</unix:file_object>
23+
24+
<ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Check OpenEmbedded" id="test_poky" version="1">
25+
<ind:object object_ref="obj_poky" />
26+
</ind:textfilecontent54_test>
27+
<ind:textfilecontent54_object id="obj_poky" version="1" comment="Check Poky">
28+
<ind:filepath>/etc/os-release</ind:filepath>
29+
<ind:pattern operation="pattern match">^ID=poky$</ind:pattern>
30+
<ind:instance datatype="int">1</ind:instance>
31+
</ind:textfilecontent54_object>
32+
33+
</def-group>

0 commit comments

Comments
 (0)