Skip to content

Commit

Permalink
Add the RHEL9 product.
Browse files Browse the repository at this point in the history
RHEL9 will come one day, so better to be prepared.
The product has been created using RHEL8 as a basis, and making sure that the build works.
No profiles or STIG overlay for the time being.
  • Loading branch information
matejak committed Apr 7, 2021
1 parent 22da9ec commit 9502e2b
Show file tree
Hide file tree
Showing 23 changed files with 379 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ option(SSG_PRODUCT_OL8 "If enabled, the Oracle Linux 8 SCAP content will be buil
option(SSG_PRODUCT_OPENSUSE "If enabled, the openSUSE SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHEL7 "If enabled, the RHEL7 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHEL8 "If enabled, the RHEL8 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHEL9 "If enabled, the RHEL9 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHOSP10 "If enabled, the RHOSP10 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHOSP13 "If enabled, the RHOSP13 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
option(SSG_PRODUCT_RHV4 "If enabled, the RHV4 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
Expand Down Expand Up @@ -256,6 +257,7 @@ message(STATUS "Oracle Linux 8: ${SSG_PRODUCT_OL8}")
message(STATUS "openSUSE: ${SSG_PRODUCT_OPENSUSE}")
message(STATUS "RHEL 7: ${SSG_PRODUCT_RHEL7}")
message(STATUS "RHEL 8: ${SSG_PRODUCT_RHEL8}")
message(STATUS "RHEL 9: ${SSG_PRODUCT_RHEL9}")
message(STATUS "RHOSP10: ${SSG_PRODUCT_RHOSP10}")
message(STATUS "RHOSP13: ${SSG_PRODUCT_RHOSP13}")
message(STATUS "RHV 4: ${SSG_PRODUCT_RHV4}")
Expand Down Expand Up @@ -353,6 +355,9 @@ endif()
if (SSG_PRODUCT_RHEL8)
add_subdirectory("rhel8")
endif()
if (SSG_PRODUCT_RHEL9)
add_subdirectory("rhel9")
endif()
if (SSG_PRODUCT_RHOSP10)
add_subdirectory("rhosp10")
endif()
Expand Down
1 change: 1 addition & 0 deletions build_product
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ all_cmake_products=(
OPENSUSE
RHEL7
RHEL8
RHEL9
RHOSP10
RHOSP13
RHV4
Expand Down
17 changes: 17 additions & 0 deletions rhel9/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sometimes our users will try to do: "cd rhel9; cmake ." That needs to error in a nice way.
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
message(FATAL_ERROR "cmake has to be used on the root CMakeLists.txt, see the Building ComplianceAsCode section in the Developer Guide!")
endif()

set(PRODUCT "rhel9")
set(DISA_SRG_TYPE "os")

ssg_build_product(${PRODUCT})

ssg_build_html_cce_table(${PRODUCT})

ssg_build_html_srgmap_tables(${PRODUCT} "stig" ${DISA_SRG_TYPE})

# ssg_build_html_stig_tables(${PRODUCT} "stig")

#ssg_build_html_stig_tables(${PRODUCT} "ospp")
173 changes: 173 additions & 0 deletions rhel9/overlays/srg_support.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<Group id="srg_support" hidden="true">
<title>Documentation to Support DISA OS SRG Mapping</title>
<description>These groups exist to document how the Red Hat Enterprise Linux
product meets (or does not meet) requirements listed in the DISA OS SRG, for
those cases where Groups or Rules elsewhere in scap-security-guide do
not clearly relate.
</description>


<!-- The CCI/SRG items referenced here are:
- satisfied (through design and implementation)
- selected in DoD baseline (per CNSS 1253) -->
<Rule id="met_inherently_generic">
<title>Product Meets this Requirement</title>
<rationale>
Red Hat Enterprise Linux meets this requirement through design and implementation.
</rationale>
<ocil>RHEL9 supports this requirement and cannot be configured to be out of
compliance. This is a permanent not a finding.
</ocil>
<description>
This requirement is a permanent not a finding. No fix is required.
</description>
<!-- Note: This XCCDF rule is used to group DISA requirements. As such,
it should not have CCE association -->
<ref disa="15,42,56,206,1084,66,85,86,185,223,171,172,1694,770,804,162,163,164,345,346,1096,1111,1291,386,156,186,1083,1082,1090,804,1127,1128,1129,1248,1265,1314,1362,1368,1310,1311,1328,1399,1400,1404,1405,1427,1499,1632,1693,1665,1674" />
</Rule>


<!-- The CCI/SRG items referenced here relate to auditing, and are:
- satisfied (through design and implementation)
- selected in DoD baseline (per CNSS 1253) -->
<Rule id="met_inherently_auditing">
<title>Product Meets this Requirement</title>
<rationale>
The Red Hat Enterprise Linux audit system meets this requirement through design and implementation.
</rationale>
<ocil>The RHEL9 auditing system supports this requirement and cannot be configured to be out of
compliance. Every audit record in RHEL includes a timestamp, the operation attempted,
success or failure of the operation, the subject involved (executable/process),
the object involved (file/path), and security labels for the subject and object.
It also includes the ability to label events with custom key labels. The auditing system
centralizes the recording of audit events for the entire system and includes
reduction (<tt>ausearch</tt>), reporting (<tt>aureport</tt>), and real-time
response (<tt>audispd</tt>) facilities.
This is a permanent not a finding.
</ocil>
<description>
This requirement is a permanent not a finding. No fix is required.
</description>
<!-- Note: This XCCDF rule is used to group DISA requirements. As such,
it should not have CCE association -->
<ref disa="130,157,131,132,133,134,135,159,174" />
</Rule>


<!-- The CCI/SRG item referenced here are:
- satisfied (through design and implementation)
- not selected in a DoD baseline -->
<Rule id="met_inherently_nonselected">
<title>Product Meets this Requirement</title>
<rationale>
Red Hat Enterprise Linux meets this requirement through design and implementation.
</rationale>
<ocil>RHEL9 supports this requirement and cannot be configured to be out of
compliance. This is a permanent not a finding.
</ocil>
<description>
This requirement is a permanent not a finding. No fix is required.
</description>
<!-- Note: This XCCDF rule is used to group DISA requirements. As such,
it should not have CCE association -->
<ref disa="34,35,99,154,226,802,872,1086,1087,1089,1091,1424,1426,1428,1209,1214,1237,1269,1338,1425,1670" />
</Rule>


<!-- The CCI/SRG item listed here are:
- satisfied (by Rules in the guidance, which include the reference)
- not selected in DoD baseline -->
<!-- disa="26,32,771,772,831,884,888,1095,1115,1117,1250,1348,1353,1464,1496" -->


<!-- The CCI/SRG item referenced here are:
- not satisfied
- not selected in a DoD baseline
- considered out of scope -->
<Rule id="unmet_nonfinding_nonselected_scope">
<title>Guidance Does Not Meet this Requirement Due to Impracticality or Scope</title>
<rationale>
The guidance does not meet this requirement.
The requirement is impractical or out of scope.
</rationale>
<ocil>
RHEL9 cannot support this requirement without assistance from an external
application, policy, or service. This requirement is NA.
</ocil>
<description>
This requirement is NA. No fix is required.
</description>
<!-- Note: This XCCDF rule is used to group DISA requirements. As such,
it should not have CCE association -->
<ref disa="21,25,28,29,30,165,221,354,553,779,780,781,1009,1094,1123,1124,1125,1132,1135,1140,1141,1142,1143,1145,1147,1148,1166,1339,1340,1341,1350,1356,1373,1374,1383,1391,1392,1395,1662" />
</Rule>


<!-- The CCI/SRG items referenced here are:
- not satisfied
- not selected in a DoD baseline
- considered permanent findings -->
<Rule id="unmet_finding_nonselected">
<title>Implementation of the Requirement is Not Supported</title>
<rationale>
RHEL9 does not support this requirement.
</rationale>
<ocil>
This is a permanent finding.
</ocil>
<description>
This requirement is a permanent finding and cannot be fixed. An appropriate
mitigation for the system must be implemented but this finding cannot be
considered fixed.
</description>
<ref disa="20,31,52,144,1158,1294,1295,1500" />
<!-- Note: CCI 52 supported for text login, but not graphical -->
</Rule>


<!-- The CCI/SRG items referenced here are:
- not satisfied
- selected in a DoD baseline
- considered NA -->
<Rule id="unmet_nonfinding_scope">
<title>Guidance Does Not Meet this Requirement Due to Impracticality or Scope</title>
<rationale>
The guidance does not meet this requirement.
The requirement is impractical or out of scope.
</rationale>
<ocil>
RHEL9 cannot support this requirement without assistance from an external
application, policy, or service. This requirement is NA.
</ocil>
<description>
This requirement is NA. No fix is required.
</description>
<!-- Note: This XCCDF rule is used to group DISA requirements. As such,
it should not have CCE association -->
<ref disa="27,218,219,371,372,535,537,539,1682,370,37,24,1112,1126,1143,1149,1157,1159,1210,1211,1274,1372,1376,1377,1352,1401,1555,1556,1150" />
</Rule>

<Rule id="update_process">
<title>A process for prompt installation of OS updates must exist.</title>
<rationale>
This is a manual inquiry about update procedure.
</rationale>
<ocil>
Ask an administrator if a process exists to promptly and automatically apply OS
software updates. If such a process does not exist, this is a finding.
<br /><br />
If the OS update process limits automatic updates of software packages, where
such updates would impede normal system operation, to scheduled maintenance
windows, but still within IAVM-dictated timeframes, this is not a finding.
</ocil>
<description>
Procedures to promptly apply software updates must be established and
executed. The Red Hat operating system provides support for automating such a
process, by running the yum program through a cron job or by managing the
system and its packages through the Red Hat Network or a Satellite Server.
</description>
<ref disa="1232" />
<!-- Note: This is a process, as such, will not receive a CCE -->
</Rule>

</Group>
32 changes: 32 additions & 0 deletions rhel9/product.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
product: rhel9
full_name: Red Hat Enterprise Linux 9
type: platform

benchmark_root: "../linux_os/guide"

profiles_root: "./profiles"

pkg_manager: "dnf"

init_system: "systemd"

# The fingerprints below are retrieved from https://access.redhat.com/security/team/key
pkg_release: ""
pkg_version: ""
aux_pkg_release: ""
aux_pkg_version: ""

release_key_fingerprint: "567E347AD0044ADE55BA8A5F199E2F91FD431D51"
auxiliary_key_fingerprint: "6A6AA7C97C8890AEC6AEBFE2F76F66C3D4082792"
oval_feed_url: "https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL9.xml"

cpes_root: "../shared/applicability"
cpes:
- rhel9:
name: "cpe:/o:redhat:enterprise_linux:9"
title: "Red Hat Enterprise Linux 9"
check_id: installed_OS_is_rhel9

# Mapping of CPE platform to package
platform_package_overrides:
login_defs: "shadow-utils"
6 changes: 6 additions & 0 deletions rhel9/transforms/cci2html.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cci="https://public.cyber.mil/stigs/cci">

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

</xsl:stylesheet>
21 changes: 21 additions & 0 deletions rhel9/transforms/constants.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

<xsl:variable name="product_long_name">Red Hat Enterprise Linux 9</xsl:variable>
<xsl:variable name="product_short_name">RHEL 9</xsl:variable>
<xsl:variable name="product_stig_id_name">RHEL_9_STIG</xsl:variable>
<xsl:variable name="prod_type">rhel9</xsl:variable>

<xsl:variable name="cisuri">https://www.cisecurity.org/benchmark/red_hat_linux/</xsl:variable>
<xsl:variable name="product_guide_id_name">RHEL-9</xsl:variable>
<xsl:variable name="disa-stigs-uri" select="$disa-stigs-os-unix-linux-uri"/>
<xsl:variable name="disa-srguri" select="$disa-ossrguri"/>

<!-- Define URI for custom CCE identifier which can be used for mapping to corporate policy -->
<!--xsl:variable name="custom-cce-uri">https://www.example.org</xsl:variable-->

<!-- Define URI for custom policy reference which can be used for linking to corporate policy -->
<!--xsl:variable name="custom-ref-uri">https://www.example.org</xsl:variable-->

</xsl:stylesheet>
8 changes: 8 additions & 0 deletions rhel9/transforms/shorthand2xccdf.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="../../shared/transforms/shared_shorthand2xccdf.xslt"/>

<xsl:include href="constants.xslt"/>
<xsl:param name="ssg_version">unknown</xsl:param>

</xsl:stylesheet>
7 changes: 7 additions & 0 deletions rhel9/transforms/table-add-srgitems.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xccdf="http://checklists.nist.gov/xccdf/1.1" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:cci="https://public.cyber.mil/stigs/cci">

<xsl:include href="../../shared/transforms/shared_table-add-srgitems.xslt"/>
<xsl:variable name="srgtable" select="document('../output/table-rhel9-srgmap-flat.xhtml')/html/body/table" />
<xsl:variable name="cci_list" select="document('../../shared/references/disa-cci-list.xml')/cci:cci_list" />

</xsl:stylesheet>
6 changes: 6 additions & 0 deletions rhel9/transforms/table-sortbyref.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:import href="../../shared/transforms/shared_table-sortbyref.xslt"/>

</xsl:stylesheet>
11 changes: 11 additions & 0 deletions rhel9/transforms/table-srgmap.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:include href="../../shared/transforms/shared_table-srgmap.xslt"/>
<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

<xsl:variable name="items" select="document($map-to-items)//*[cdf:reference]" />
<xsl:variable name="title" select="document($map-to-items)/cdf:Benchmark/cdf:title" />

</xsl:stylesheet>
5 changes: 5 additions & 0 deletions rhel9/transforms/table-style.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="../../shared/transforms/shared_table-style.xslt"/>

</xsl:stylesheet>
8 changes: 8 additions & 0 deletions rhel9/transforms/xccdf-apply-overlay-stig.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://checklists.nist.gov/xccdf/1.1" xmlns:xccdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xccdf">

<xsl:include href="../../shared/transforms/shared_xccdf-apply-overlay-stig.xslt"/>
<xsl:include href="constants.xslt"/>
<xsl:variable name="overlays" select="document($overlay)/xccdf:overlays" />

</xsl:stylesheet>
7 changes: 7 additions & 0 deletions rhel9/transforms/xccdf2stigformat.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://checklists.nist.gov/xccdf/1.1" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="cdf">

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

</xsl:stylesheet>
9 changes: 9 additions & 0 deletions rhel9/transforms/xccdf2table-byref.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:import href="../../shared/transforms/shared_xccdf2table-byref.xslt"/>

<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

</xsl:stylesheet>
9 changes: 9 additions & 0 deletions rhel9/transforms/xccdf2table-cce.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cce="http://cce.mitre.org" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:import href="../../shared/transforms/shared_xccdf2table-cce.xslt"/>

<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

</xsl:stylesheet>
8 changes: 8 additions & 0 deletions rhel9/transforms/xccdf2table-profileanssirefs.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:import href="../../shared/transforms/shared_xccdf2table-profileanssirefs.xslt"/>
<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

</xsl:stylesheet>
9 changes: 9 additions & 0 deletions rhel9/transforms/xccdf2table-profileccirefs.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cci="https://public.cyber.mil/stigs/cci" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ovalns="http://oval.mitre.org/XMLSchema/oval-definitions-5">

<xsl:import href="../../shared/transforms/shared_xccdf2table-profileccirefs.xslt"/>

<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

</xsl:stylesheet>
9 changes: 9 additions & 0 deletions rhel9/transforms/xccdf2table-profilecisrefs.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xsl:import href="../../shared/transforms/shared_xccdf2table-profilecisrefs.xslt"/>

<xsl:include href="constants.xslt"/>
<xsl:include href="table-style.xslt"/>

</xsl:stylesheet>

0 comments on commit 9502e2b

Please sign in to comment.