Skip to content

Commit

Permalink
Merge pull request #12142 from svet-se/fix-sle-micro-5-product
Browse files Browse the repository at this point in the history
Update/Fix SLE Micro 5 product
  • Loading branch information
teacup-on-rockingchair authored Jul 10, 2024
2 parents 7ec1b40 + 5b98851 commit 8eb172f
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 59 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ option(SSG_PRODUCT_RHEL10 "If enabled, the RHEL10 SCAP content will be built" ${
option(SSG_PRODUCT_RHV4 "If enabled, the RHV4 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_SLE12 "If enabled, the SLE12 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_SLE15 "If enabled, the SLE15 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_SLMICRO5 "If enabled, the SLE MicroOS 5.x SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_SLMICRO5 "If enabled, the SLE Micro 5.x SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_UBUNTU1604 "If enabled, the Ubuntu 16.04 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_UBUNTU1804 "If enabled, the Ubuntu 18.04 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_UBUNTU2004 "If enabled, the Ubuntu 20.04 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
Expand Down Expand Up @@ -338,7 +338,7 @@ message(STATUS "RHEL 10: ${SSG_PRODUCT_RHEL10}")
message(STATUS "RHV 4: ${SSG_PRODUCT_RHV4}")
message(STATUS "SUSE 12: ${SSG_PRODUCT_SLE12}")
message(STATUS "SUSE 15: ${SSG_PRODUCT_SLE15}")
message(STATUS "SLE MicroOS 5: ${SSG_PRODUCT_SLMICRO5}")
message(STATUS "SLE Micro 5: ${SSG_PRODUCT_SLMICRO5}")
message(STATUS "Ubuntu 16.04: ${SSG_PRODUCT_UBUNTU1604}")
message(STATUS "Ubuntu 18.04: ${SSG_PRODUCT_UBUNTU1804}")
message(STATUS "Ubuntu 20.04: ${SSG_PRODUCT_UBUNTU2004}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<extend_definition comment="Installed OS is OL8" definition_ref="installed_OS_is_ol8" />
<extend_definition comment="Installed OS is SLE12" definition_ref="installed_OS_is_sle12" />
<extend_definition comment="Installed OS is SLE15" definition_ref="installed_OS_is_sle15" />
<extend_definition comment="Installed OS is SLE MicroOS 5.X" definition_ref="installed_OS_is_slmicro5" />
<extend_definition comment="Installed OS is SLE Micro 5.X" definition_ref="installed_OS_is_slmicro5" />
</criteria>
</definition>

Expand Down
12 changes: 6 additions & 6 deletions products/slmicro5/product.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
product: slmicro5
full_name: SUSE Linux Enterprise Micro OS 5.x
full_name: SUSE Linux Enterprise Micro 5.x
type: platform

major_version_ordinal: 5
Expand All @@ -25,17 +25,17 @@ cpes:
check_id: installed_OS_is_slmicro5

- slmicro-5.3:
name: "cpe:/o:suse:sle-microos:5.3"
title: "SLE MicroOS 5.3"
name: "cpe:/o:suse:sle-micro:5.3"
title: "SLE Micro 5.3"
check_id: installed_OS_is_slmicro5

- slmicro-5.4:
name: "cpe:/o:suse:sle-microos:5.4"
title: "SLE Micro 5.5"
name: "cpe:/o:suse:sle-micro:5.4"
title: "SLE Micro 5.4"
check_id: installed_OS_is_slmicro5

- slmicro-5.5:
name: "cpe:/o:suse:sle-microos:5.5"
name: "cpe:/o:suse:sle-micro:5.5"
title: "SLE Micro 5.5"
check_id: installed_OS_is_slmicro5

Expand Down
2 changes: 2 additions & 0 deletions products/slmicro5/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ documentation_complete: true
metadata:
version: V1R1
SMEs:
- svet-se
- rumch-se
- teacup-on-rockingchair

reference: https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux
Expand Down
8 changes: 4 additions & 4 deletions products/slmicro5/transforms/constants.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<xsl:include href="../../../shared/transforms/shared_constants.xslt"/>

<xsl:variable name="product_long_name">SUSE Linux Enterprise Micro OS 5.x</xsl:variable>
<xsl:variable name="product_short_name">SLE Micro OS 5</xsl:variable>
<xsl:variable name="product_stig_id_name">SUSE_Linux_Enterprise_Micro_OS_5_STIG</xsl:variable>
<xsl:variable name="product_long_name">SUSE Linux Enterprise Micro 5.x</xsl:variable>
<xsl:variable name="product_short_name">SLE Micro 5</xsl:variable>
<xsl:variable name="product_stig_id_name">SUSE_Linux_Enterprise_Micro_5_STIG</xsl:variable>
<xsl:variable name="prod_type">slmicro5</xsl:variable>

<!-- Define URI of official Center for Internet Security Benchmark for SUSE Linux Enterprise Micro OS 5-->
<!-- Define URI of official Center for Internet Security Benchmark for SUSE Linux Enterprise Micro 5-->
<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/suse_linux/</xsl:variable>

</xsl:stylesheet>
103 changes: 59 additions & 44 deletions shared/checks/oval/installed_OS_is_slmicro5.xml
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
<def-group>
<definition class="inventory"
id="installed_OS_is_slmicro5" version="1">
<metadata>
<title>SUSE Linux Enterprise MicroOS</title>
<affected family="unix">
<platform>multi_platform_all</platform>
</affected>
<reference ref_id="cpe:/o:suse:suse-microos:5.2"
source="CPE" />
<reference ref_id="cpe:/o:suse:suse-microos:5.3"
source="CPE" />
<reference ref_id="cpe:/o:suse:suse-microos:5.4"
source="CPE" />
<reference ref_id="cpe:/o:suse:suse-microos:5.5"
source="CPE" />
<description>The operating system installed on the system is
SUSE Linux Enterprise MicroOS.</description>
</metadata>
<criteria>
<criterion comment="Installed operating system is part of the unix family"
test_ref="test_slmicro5_unix_family" />
<criteria operator="OR">
<criterion comment="SLE MicroOS 5.* is installed" test_ref="test_slmicro5" />
</criteria>
</criteria>
</definition>
<definition class="inventory"
id="installed_OS_is_slmicro5" version="1">
<metadata>
<title>SUSE Linux Enterprise Micro</title>
<affected family="unix">
<platform>multi_platform_all</platform>
</affected>
<reference ref_id="cpe:/o:suse:suse-microos:5.2"
source="CPE" />
<reference ref_id="cpe:/o:suse:sle-micro:5.3"
source="CPE" />
<reference ref_id="cpe:/o:suse:sle-micro:5.4"
source="CPE" />
<reference ref_id="cpe:/o:suse:sle-micro:5.5"
source="CPE" />
<description>The operating system installed on the system is
SUSE Linux Enterprise Micro.</description>
</metadata>
<criteria>
<criterion comment="Installed operating system is part of the unix family"
test_ref="test_slmicro5_unix_family" />
<criteria operator="OR">
<criterion comment="SUSE MicroOS 5.* is installed" test_ref="test_slmicroos5" />
<criterion comment="SLE Micro 5.* is installed" test_ref="test_slmicro5" />
</criteria>
</criteria>
</definition>

<ind:family_test check="all" check_existence="at_least_one_exists" comment="installed OS part of unix family" id="test_slmicro5_unix_family" version="1">
<ind:object object_ref="obj_slmicro5_unix_family" />
<ind:state state_ref="state_slmicro5_unix_family" />
</ind:family_test>
<ind:family_state id="state_slmicro5_unix_family" version="1">
<ind:family>unix</ind:family>
</ind:family_state>
<ind:family_object id="obj_slmicro5_unix_family" version="1" />
<ind:family_test check="all" check_existence="at_least_one_exists"
comment="installed OS part of unix family" id="test_slmicro5_unix_family" version="1">
<ind:object object_ref="obj_slmicro5_unix_family" />
<ind:state state_ref="state_slmicro5_unix_family" />
</ind:family_test>
<ind:family_state id="state_slmicro5_unix_family" version="1">
<ind:family>unix</ind:family>
</ind:family_state>
<ind:family_object id="obj_slmicro5_unix_family" version="1" />

<linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="sle-micro-release is version 5" id="test_slmicro5" version="1">
<linux:object object_ref="obj_slmicro5" />
<linux:state state_ref="state_slmicro5" />
</linux:rpminfo_test>
<linux:rpminfo_state id="state_slmicro5" version="1">
<linux:version operation="pattern match">^5.*$</linux:version>
</linux:rpminfo_state>
<linux:rpminfo_object id="obj_slmicro5" version="1">
<linux:name>SUSE-MicroOS-release</linux:name>
</linux:rpminfo_object>
<linux:rpminfo_test check="all" check_existence="at_least_one_exists"
comment="sle-micro-release is version 5" id="test_slmicroos5" version="1">
<linux:object object_ref="obj_slmicroos5" />
<linux:state state_ref="state_slmicroos5" />
</linux:rpminfo_test>
<linux:rpminfo_state id="state_slmicroos5" version="1">
<linux:version operation="pattern match">^5.*$</linux:version>
</linux:rpminfo_state>
<linux:rpminfo_object id="obj_slmicroos5" version="1">
<linux:name>SUSE-MicroOS-release</linux:name>
</linux:rpminfo_object>

<linux:rpminfo_test check="all" check_existence="at_least_one_exists"
comment="sle-micro-release is version 5" id="test_slmicro5" version="1">
<linux:object object_ref="obj_slmicro5" />
<linux:state state_ref="state_slmicro5" />
</linux:rpminfo_test>
<linux:rpminfo_state id="state_slmicro5" version="1">
<linux:version operation="pattern match">^5.*$</linux:version>
</linux:rpminfo_state>
<linux:rpminfo_object id="obj_slmicro5" version="1">
<linux:name>SLE-Micro-release</linux:name>
</linux:rpminfo_object>

</def-group>
1 change: 1 addition & 0 deletions shared/checks/oval/sysctl_kernel_ipv6_disable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<platform>multi_platform_rhel</platform>
<platform>multi_platform_rhv</platform>
<platform>multi_platform_sle</platform>
<platform>multi_platform_slmicro</platform>
<platform>multi_platform_ubuntu</platform>
<platform>multi_platform_uos</platform>
</affected>
Expand Down
4 changes: 2 additions & 2 deletions ssg/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
"Red Hat Virtualization 4": "rhv4",
"SUSE Linux Enterprise 12": "sle12",
"SUSE Linux Enterprise 15": "sle15",
"SUSE Linux Enterprise Micro OS 5.x": "slmicro5",
"SUSE Linux Enterprise Micro 5.x": "slmicro5",
"Ubuntu 16.04": "ubuntu1604",
"Ubuntu 18.04": "ubuntu1804",
"Ubuntu 20.04": "ubuntu2004",
Expand Down Expand Up @@ -427,7 +427,7 @@
'openeuler': 'openEuler',
'opensuse': 'openSUSE',
'sle': 'SUSE Linux Enterprise',
'slmicro': 'SUSE Linux Enterprise Micro OS',
'slmicro': 'SUSE Linux Enterprise Micro',
'example': 'Example',
'ol': 'Oracle Linux',
'ocp': 'Red Hat OpenShift Container Platform',
Expand Down

0 comments on commit 8eb172f

Please sign in to comment.