Blame SOURCES/scap-security-guide-0.1.44-cpe-pam-systemd-yum.patch

0cd8e1
From 32caed89b5cf14f86e5d842569c4f73cdae6ed26 Mon Sep 17 00:00:00 2001
0cd8e1
From: Shawn Wells <shawn@redhat.com>
0cd8e1
Date: Wed, 3 Apr 2019 16:49:38 -0400
0cd8e1
Subject: [PATCH 01/11] create PAM package CPE
0cd8e1
0cd8e1
---
0cd8e1
 .../oval/installed_env_has_pam_package.xml    | 25 +++++++++++++++++++
0cd8e1
 1 file changed, 25 insertions(+)
0cd8e1
 create mode 100644 shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_pam_package.xml b/shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
new file mode 100644
0cd8e1
index 0000000000..b6376575b2
0cd8e1
--- /dev/null
0cd8e1
+++ b/shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
@@ -0,0 +1,25 @@
0cd8e1
+<def-group>
0cd8e1
+
0cd8e1
+  
0cd8e1
+  id="installed_env_has_pam_package" version="1">
0cd8e1
+    <metadata>
0cd8e1
+      <title>Package pam is installed</title>
0cd8e1
+      <affected family="unix">
0cd8e1
+        <platform>multi_platform_all</platform>
0cd8e1
+      </affected>
0cd8e1
+      <description>Checks if package pam is installed.</description>
0cd8e1
+      <reference ref_id="cpe:/a:pam" source="CPE" />
0cd8e1
+    </metadata>
0cd8e1
+    <criteria>
0cd8e1
+      <criterion comment="Package pam is installed" test_ref="test_env_has_pam_installed" />
0cd8e1
+    </criteria>
0cd8e1
+  </definition>
0cd8e1
+
0cd8e1
+  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package pam installed" id="test_env_has_pam_installed" version="1">
0cd8e1
+    <linux:object object_ref="obj_env_has_pam_installed" />
0cd8e1
+  </linux:rpminfo_test>
0cd8e1
+  <linux:rpminfo_object id="obj_env_has_pam_installed" version="1">
0cd8e1
+    <linux:name>pam</linux:name>
0cd8e1
+  </linux:rpminfo_object>
0cd8e1
+
0cd8e1
+</def-group>
0cd8e1
0cd8e1
From 213a472a89b3b591a4fd441bcf0f0f3ba633afe3 Mon Sep 17 00:00:00 2001
0cd8e1
From: Shawn Wells <shawn@redhat.com>
0cd8e1
Date: Wed, 3 Apr 2019 16:49:53 -0400
0cd8e1
Subject: [PATCH 02/11] add PAM CPE to constants
0cd8e1
0cd8e1
---
0cd8e1
 ssg/constants.py | 1 +
0cd8e1
 1 file changed, 1 insertion(+)
0cd8e1
0cd8e1
diff --git a/ssg/constants.py b/ssg/constants.py
0cd8e1
index f96fd51790..e87eb7f43c 100644
0cd8e1
--- a/ssg/constants.py
0cd8e1
+++ b/ssg/constants.py
0cd8e1
@@ -376,6 +376,7 @@
0cd8e1
 XCCDF_PLATFORM_TO_CPE = {
0cd8e1
     "machine": "cpe:/a:machine",
0cd8e1
     "container": "cpe:/a:container",
0cd8e1
+    "pam": "cpe:/a:pam",
0cd8e1
     "shadow-utils": "cpe:/a:shadow-utils",
0cd8e1
 }
0cd8e1
 
0cd8e1
0cd8e1
From 6afde50cf7a4a75829ed092c8e30116df7a99601 Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 15:43:04 +0200
0cd8e1
Subject: [PATCH 03/11] Update rules for PAM CPE check
0cd8e1
0cd8e1
---
0cd8e1
 .../accounts_password_pam_dcredit.rule                      | 2 ++
0cd8e1
 .../accounts_password_pam_difok.rule                        | 2 ++
0cd8e1
 .../accounts_password_pam_maxclassrepeat.rule               | 2 ++
0cd8e1
 .../accounts_password_pam_minclass.rule                     | 2 ++
0cd8e1
 .../accounts_password_pam_minlen.rule                       | 2 ++
0cd8e1
 .../accounts_max_concurrent_login_sessions.rule             | 2 ++
0cd8e1
 6 files changed, 12 insertions(+)
0cd8e1
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_dcredit.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_dcredit.rule
0cd8e1
index 72fc5970ea..fe997d97c8 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_dcredit.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_dcredit.rule
0cd8e1
@@ -52,3 +52,5 @@ ocil: |-
0cd8e1
     
$ grep dcredit /etc/security/pwquality.conf
0cd8e1
     The <tt>dcredit</tt> parameter (as a negative number) will indicate how many digits are required.
0cd8e1
     The DoD requires at least one digit in a password. This would appear as <tt>dcredit = -1</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_difok.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_difok.rule
0cd8e1
index 931f0aa9e4..d1855a2cf4 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_difok.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_difok.rule
0cd8e1
@@ -53,3 +53,5 @@ ocil: |-
0cd8e1
     To check how many characters must differ during a password change, run the following command:
0cd8e1
     
$ grep difok /etc/security/pwquality.conf
0cd8e1
     The <tt>difok</tt> parameter will indicate how many characters must differ.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat.rule
0cd8e1
index 35de1318d5..d964a5e3ea 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_maxclassrepeat.rule
0cd8e1
@@ -43,3 +43,5 @@ ocil: |-
0cd8e1
     To check the value for maximum consecutive repeating characters, run the following command:
0cd8e1
     
$ grep maxclassrepeat /etc/security/pwquality.conf
0cd8e1
     For DoD systems, the output should show <tt>maxclassrepeat</tt>=4.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minclass.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minclass.rule
0cd8e1
index 7f99aba143..dc3377de0b 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minclass.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minclass.rule
0cd8e1
@@ -60,3 +60,5 @@ ocil: |-
0cd8e1
     The <tt>minclass</tt> parameter will indicate how many character classes must be used. If
0cd8e1
     the requirement was for the password to contain characters from three different categories,
0cd8e1
     then this would appear as <tt>minclass = 3</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minlen.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minlen.rule
0cd8e1
index d6462579fe..0799aecf01 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minlen.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_minlen.rule
0cd8e1
@@ -49,3 +49,5 @@ ocil: |-
0cd8e1
     To check how many characters are required in a password, run the following command:
0cd8e1
     
$ grep minlen /etc/security/pwquality.conf
0cd8e1
     Your output should contain <tt>minlen = <sub idref="var_password_pam_minlen" /></tt>
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-session/accounts_max_concurrent_login_sessions.rule b/linux_os/guide/system/accounts/accounts-session/accounts_max_concurrent_login_sessions.rule
0cd8e1
index bd53c19c08..f9d9a08706 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-session/accounts_max_concurrent_login_sessions.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-session/accounts_max_concurrent_login_sessions.rule
0cd8e1
@@ -45,3 +45,5 @@
0cd8e1
 ocil_clause: 'maxlogins is not equal to or less than the expected value'
0cd8e1
 
0cd8e1
 ocil: "Run the following command to ensure the <tt>maxlogins</tt> value is configured for all users\non the system:\n
# grep \"maxlogins\" /etc/security/limits.conf
\nYou should receive output similar to the following:\n
*\t\thard\tmaxlogins\t<sub idref=\"var_accounts_max_concurrent_login_sessions\" />
"
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
0cd8e1
From 351ee6945df37a28cc4f4589b17eb4c35066b00b Mon Sep 17 00:00:00 2001
0cd8e1
From: Shawn Wells <shawn@redhat.com>
0cd8e1
Date: Wed, 3 Apr 2019 17:17:40 -0400
0cd8e1
Subject: [PATCH 04/11] add libuser CPE
0cd8e1
0cd8e1
---
0cd8e1
 .../installed_env_has_libuser_package.xml     | 24 +++++++++++++++++++
0cd8e1
 1 file changed, 24 insertions(+)
0cd8e1
 create mode 100644 shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_libuser_package.xml b/shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
new file mode 100644
0cd8e1
index 0000000000..ee79b19f8a
0cd8e1
--- /dev/null
0cd8e1
+++ b/shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
@@ -0,0 +1,24 @@
0cd8e1
+<def-group>
0cd8e1
+  
0cd8e1
+  id="installed_env_has_libuser_package" version="1">
0cd8e1
+    <metadata>
0cd8e1
+      <title>Package libuser is installed</title>
0cd8e1
+      <affected family="unix">
0cd8e1
+        <platform>multi_platform_all</platform>
0cd8e1
+      </affected>
0cd8e1
+      <description>Checks if package libuser is installed.</description>
0cd8e1
+      <reference ref_id="cpe:/a:libuser" source="CPE" />
0cd8e1
+    </metadata>
0cd8e1
+    <criteria>
0cd8e1
+      <criterion comment="Package libuser is installed" test_ref="test_env_has_libuser_installed" />
0cd8e1
+    </criteria>
0cd8e1
+  </definition>
0cd8e1
+
0cd8e1
+  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package libuser installed" id="test_env_has_libuser_installed" version="1">
0cd8e1
+    <linux:object object_ref="obj_env_has_libuser_installed" />
0cd8e1
+  </linux:rpminfo_test>
0cd8e1
+  <linux:rpminfo_object id="obj_env_has_libuser_installed" version="1">
0cd8e1
+    <linux:name>libuser</linux:name>
0cd8e1
+  </linux:rpminfo_object>
0cd8e1
+
0cd8e1
+</def-group>
0cd8e1
0cd8e1
From e0b2db79f718b2f64ec25c39f01b53d4e9a80b00 Mon Sep 17 00:00:00 2001
0cd8e1
From: Shawn Wells <shawn@redhat.com>
0cd8e1
Date: Wed, 3 Apr 2019 17:17:50 -0400
0cd8e1
Subject: [PATCH 05/11] add systemd CPE
0cd8e1
0cd8e1
---
0cd8e1
 .../installed_env_has_systemd_package.xml     | 24 +++++++++++++++++++
0cd8e1
 1 file changed, 24 insertions(+)
0cd8e1
 create mode 100644 shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_systemd_package.xml b/shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
new file mode 100644
0cd8e1
index 0000000000..99706ee1c6
0cd8e1
--- /dev/null
0cd8e1
+++ b/shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
@@ -0,0 +1,24 @@
0cd8e1
+<def-group>
0cd8e1
+  
0cd8e1
+  id="installed_env_has_systemd_package" version="1">
0cd8e1
+    <metadata>
0cd8e1
+      <title>Package systemd is installed</title>
0cd8e1
+      <affected family="unix">
0cd8e1
+        <platform>multi_platform_all</platform>
0cd8e1
+      </affected>
0cd8e1
+      <description>Checks if package systemd is installed.</description>
0cd8e1
+      <reference ref_id="cpe:/a:systemd" source="CPE" />
0cd8e1
+    </metadata>
0cd8e1
+    <criteria>
0cd8e1
+      <criterion comment="Package systemd is installed" test_ref="test_env_has_systemd_installed" />
0cd8e1
+    </criteria>
0cd8e1
+  </definition>
0cd8e1
+
0cd8e1
+  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package systemd installed" id="test_env_has_systemd_installed" version="1">
0cd8e1
+    <linux:object object_ref="obj_env_has_systemd_installed" />
0cd8e1
+  </linux:rpminfo_test>
0cd8e1
+  <linux:rpminfo_object id="obj_env_has_systemd_installed" version="1">
0cd8e1
+    <linux:name>systemd</linux:name>
0cd8e1
+  </linux:rpminfo_object>
0cd8e1
+
0cd8e1
+</def-group>
0cd8e1
0cd8e1
From 2ec6e5654ef63232c973d91cdee6f8eb9156eb9b Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 15:45:01 +0200
0cd8e1
Subject: [PATCH 06/11] Update rules with package CPEs
0cd8e1
0cd8e1
---
0cd8e1
 .../accounts/accounts-pam/display_login_attempts.rule       | 2 ++
0cd8e1
 .../accounts_password_pam_unix_remember.rule                | 2 ++
0cd8e1
 .../accounts_passwords_pam_faillock_deny.rule               | 2 ++
0cd8e1
 .../accounts_passwords_pam_faillock_deny_root.rule          | 2 ++
0cd8e1
 .../accounts_passwords_pam_faillock_interval.rule           | 2 ++
0cd8e1
 .../accounts_passwords_pam_faillock_unlock_time.rule        | 2 ++
0cd8e1
 .../accounts_password_pam_lcredit.rule                      | 2 ++
0cd8e1
 .../accounts_password_pam_ocredit.rule                      | 2 ++
0cd8e1
 .../accounts_password_pam_retry.rule                        | 2 ++
0cd8e1
 .../accounts_password_pam_ucredit.rule                      | 2 ++
0cd8e1
 .../set_password_hashing_algorithm_libuserconf.rule         | 2 ++
0cd8e1
 .../set_password_hashing_algorithm_logindefs.rule           | 2 ++
0cd8e1
 .../set_password_hashing_algorithm_systemauth.rule          | 2 ++
0cd8e1
 .../accounts-physical/disable_ctrlaltdel_burstaction.rule   | 2 ++
0cd8e1
 .../user_umask/accounts_umask_etc_login_defs.rule           | 2 ++
0cd8e1
 ssg/constants.py                                                | 2 ++
0cd8e1
 16 files changed, 32 insertions(+)
0cd8e1
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/display_login_attempts.rule b/linux_os/guide/system/accounts/accounts-pam/display_login_attempts.rule
0cd8e1
index 5c2287a4d3..baeece4b59 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/display_login_attempts.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/display_login_attempts.rule
0cd8e1
@@ -47,3 +47,5 @@ ocil: |-
0cd8e1
     the following command:
0cd8e1
     
$ grep pam_lastlog.so /etc/pam.d/postlogin
0cd8e1
     The output should show output <tt>showfailed</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_unix_remember.rule b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_unix_remember.rule
0cd8e1
index dcde239e85..a63e0e6d1d 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_unix_remember.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_unix_remember.rule
0cd8e1
@@ -56,3 +56,5 @@ ocil: |-
0cd8e1
     
$ grep remember /etc/pam.d/system-auth
0cd8e1
     The output should show the following at the end of the line:
0cd8e1
     
remember=<sub idref="var_password_pam_unix_remember" />
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny.rule b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny.rule
0cd8e1
index c8147e7c17..e10b0a1b67 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny.rule
0cd8e1
@@ -56,3 +56,5 @@ ocil: |-
0cd8e1
     To ensure the failed password attempt policy is configured correctly, run the following command:
0cd8e1
     
$ grep pam_faillock /etc/pam.d/system-auth
0cd8e1
     The output should show <tt>deny=<sub idref="var_accounts_passwords_pam_faillock_deny" /></tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny_root.rule b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny_root.rule
0cd8e1
index b5283b052e..b4c4df7186 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny_root.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_deny_root.rule
0cd8e1
@@ -50,3 +50,5 @@ ocil: |-
0cd8e1
     attempts, run the following command:
0cd8e1
     
$ grep even_deny_root /etc/pam.d/system-auth
0cd8e1
     The output should show <tt>even_deny_root</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_interval.rule b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_interval.rule
0cd8e1
index 485fb7970d..ac21fe4c81 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_interval.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_interval.rule
0cd8e1
@@ -65,3 +65,5 @@
0cd8e1
 ocil_clause: 'fail_interval is less than the required value'
0cd8e1
 
0cd8e1
 ocil: "To ensure the failed password attempt policy is configured correctly, run the following command:\n
$ grep pam_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth
\nFor each file, the output should show <tt>fail_interval=<interval-in-seconds></tt> where <tt>interval-in-seconds</tt> is \n<tt><sub idref=\"var_accounts_passwords_pam_faillock_fail_interval\" /></tt> or greater. \nIf the <tt>fail_interval</tt> parameter is not set, the default setting of 900 seconds is acceptable."
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_unlock_time.rule b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_unlock_time.rule
0cd8e1
index 9abd02feea..f4bfaec622 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_unlock_time.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_faillock_unlock_time.rule
0cd8e1
@@ -59,3 +59,5 @@ ocil: |-
0cd8e1
     To ensure the failed password attempt policy is configured correctly, run the following command:
0cd8e1
     
$ grep pam_faillock /etc/pam.d/system-auth
0cd8e1
     The output should show <tt>unlock_time=<some-large-number></tt> or <tt>never</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_lcredit.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_lcredit.rule
0cd8e1
index ba0be4ebeb..21d86585ed 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_lcredit.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_lcredit.rule
0cd8e1
@@ -51,3 +51,5 @@ ocil: |-
0cd8e1
     
$ grep lcredit /etc/security/pwquality.conf
0cd8e1
     The <tt>lcredit</tt> parameter (as a negative number) will indicate how many special characters are required.
0cd8e1
     The DoD and FISMA require at least one lowercase character in a password. This would appear as <tt>lcredit = -1</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ocredit.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ocredit.rule
0cd8e1
index c39cc2a09b..d7f7083d27 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ocredit.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ocredit.rule
0cd8e1
@@ -53,3 +53,5 @@ ocil: |-
0cd8e1
     The <tt>ocredit</tt> parameter (as a negative number) will indicate how many special characters are required.
0cd8e1
     The DoD and FISMA require at least one special character in a password.
0cd8e1
     This would appear as <tt>ocredit = -1</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry.rule
0cd8e1
index c0f8ed8d6d..fea35e37a3 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry.rule
0cd8e1
@@ -46,3 +46,5 @@ ocil: |-
0cd8e1
     The <tt>retry</tt> parameter will indicate how many attempts are permitted.
0cd8e1
     The DoD required value is less than or equal to 3.
0cd8e1
     This would appear as <tt>retry=3</tt>, or a lower value.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ucredit.rule b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ucredit.rule
0cd8e1
index 2222ac2297..a4ecdf969d 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ucredit.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_ucredit.rule
0cd8e1
@@ -50,3 +50,5 @@ ocil: |-
0cd8e1
     The <tt>ucredit</tt> parameter (as a negative number) will indicate how many uppercase characters are required.
0cd8e1
     The DoD and FISMA require at least one uppercase character in a password.
0cd8e1
     This would appear as <tt>ucredit = -1</tt>.
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_libuserconf.rule b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_libuserconf.rule
0cd8e1
index 0f6cf57e57..397bad4ea6 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_libuserconf.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_libuserconf.rule
0cd8e1
@@ -55,3 +55,5 @@ ocil: |-
0cd8e1
     Inspect <tt>/etc/libuser.conf</tt> and ensure the following line appears
0cd8e1
     in the <tt>[default]</tt> section:
0cd8e1
     
crypt_style = sha512
0cd8e1
+
0cd8e1
+platform: libuser
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_logindefs.rule b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_logindefs.rule
0cd8e1
index a23a7863c9..84212c7648 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_logindefs.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_logindefs.rule
0cd8e1
@@ -47,3 +47,5 @@ ocil_clause: 'it does not'
0cd8e1
 ocil: |-
0cd8e1
     Inspect <tt>/etc/login.defs</tt> and ensure the following line appears:
0cd8e1
     
ENCRYPT_METHOD SHA512
0cd8e1
+
0cd8e1
+platform: shadow-utils
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth.rule b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth.rule
0cd8e1
index 070e65fc3a..48e8ac427d 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-pam/set_password_hashing_algorithm/set_password_hashing_algorithm_systemauth.rule
0cd8e1
@@ -65,3 +65,5 @@ ocil: |-
0cd8e1
     ensure that the <tt>pam_unix.so</tt> module includes the argument
0cd8e1
     <tt>sha512</tt>:
0cd8e1
     
$ grep sha512 /etc/pam.d/system-auth
0cd8e1
+
0cd8e1
+platform: pam
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction.rule b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction.rule
0cd8e1
index e215a41a91..d68bf2be38 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-physical/disable_ctrlaltdel_burstaction.rule
0cd8e1
@@ -53,3 +53,5 @@ warnings:
0cd8e1
         key sequence if running in <tt>runlevel 6</tt> (e.g. in GNOME, KDE, etc.)! The
0cd8e1
         <tt>Ctrl-Alt-Del</tt> key sequence will only be disabled if running in
0cd8e1
         the non-graphical <tt>runlevel 3</tt>.
0cd8e1
+
0cd8e1
+platform: systemd
0cd8e1
diff --git a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs.rule b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs.rule
0cd8e1
index e9e327352b..a087ca8f6a 100644
0cd8e1
--- a/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs.rule
0cd8e1
+++ b/linux_os/guide/system/accounts/accounts-session/user_umask/accounts_umask_etc_login_defs.rule
0cd8e1
@@ -41,3 +41,5 @@ ocil: |-
0cd8e1
     All output must show the value of <tt>umask</tt> set as shown in the below:
0cd8e1
     
# grep -i "UMASK" /etc/login.defs
0cd8e1
     umask <sub idref="var_accounts_user_umask" />
0cd8e1
+
0cd8e1
+platform: shadow-utils
0cd8e1
diff --git a/ssg/constants.py b/ssg/constants.py
0cd8e1
index e87eb7f43c..8b3a792f10 100644
0cd8e1
--- a/ssg/constants.py
0cd8e1
+++ b/ssg/constants.py
0cd8e1
@@ -376,8 +376,10 @@
0cd8e1
 XCCDF_PLATFORM_TO_CPE = {
0cd8e1
     "machine": "cpe:/a:machine",
0cd8e1
     "container": "cpe:/a:container",
0cd8e1
+    "libuser": "cpe:/a:libuser",
0cd8e1
     "pam": "cpe:/a:pam",
0cd8e1
     "shadow-utils": "cpe:/a:shadow-utils",
0cd8e1
+    "systemd": "cpe:/a:systemd",
0cd8e1
 }
0cd8e1
 
0cd8e1
 # Application constants
0cd8e1
0cd8e1
From e884c6f090bf4a7963721b4948f18b05193cc0bb Mon Sep 17 00:00:00 2001
0cd8e1
From: Shawn Wells <shawn@redhat.com>
0cd8e1
Date: Wed, 3 Apr 2019 17:45:31 -0400
0cd8e1
Subject: [PATCH 07/11] Update LDAP check to evaluate for nss-pam-ldapd CPE
0cd8e1
0cd8e1
---
0cd8e1
 .../ldap_client_start_tls.rule            |  2 ++
0cd8e1
 ...nstalled_env_has_nss-pam-ldapd_package.xml | 24 +++++++++++++++++++
0cd8e1
 ssg/constants.py                              |  1 +
0cd8e1
 3 files changed, 27 insertions(+)
0cd8e1
 create mode 100644 shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
0cd8e1
diff --git a/linux_os/guide/services/ldap/openldap_client/ldap_client_start_tls.rule b/linux_os/guide/services/ldap/openldap_client/ldap_client_start_tls.rule
0cd8e1
index c4839d7de5..22a9fd60d9 100644
0cd8e1
--- a/linux_os/guide/services/ldap/openldap_client/ldap_client_start_tls.rule
0cd8e1
+++ b/linux_os/guide/services/ldap/openldap_client/ldap_client_start_tls.rule
0cd8e1
@@ -48,3 +48,5 @@ ocil: |-
0cd8e1
     
$ grep start_tls /etc/pam_ldap.conf
0cd8e1
     The result should contain:
0cd8e1
     
ssl start_tls
0cd8e1
+
0cd8e1
+platform: nss-pam-ldapd
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml b/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
new file mode 100644
0cd8e1
index 0000000000..0637e4a64e
0cd8e1
--- /dev/null
0cd8e1
+++ b/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
@@ -0,0 +1,24 @@
0cd8e1
+<def-group>
0cd8e1
+  
0cd8e1
+  id="installed_env_has_nss-pam-ldapd_package" version="1">
0cd8e1
+    <metadata>
0cd8e1
+      <title>Package nss-pam-ldapd is installed</title>
0cd8e1
+      <affected family="unix">
0cd8e1
+        <platform>multi_platform_all</platform>
0cd8e1
+      </affected>
0cd8e1
+      <description>Checks if package nss-pam-ldapd is installed.</description>
0cd8e1
+      <reference ref_id="cpe:/a:nss-pam-ldapd" source="CPE" />
0cd8e1
+    </metadata>
0cd8e1
+    <criteria>
0cd8e1
+      <criterion comment="Package nss-pam-ldapd is installed" test_ref="test_env_has_nss-pam-ldapd_installed" />
0cd8e1
+    </criteria>
0cd8e1
+  </definition>
0cd8e1
+
0cd8e1
+  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package nss-pam-ldapd installed" id="test_env_has_nss-pam-ldapd_installed" version="1">
0cd8e1
+    <linux:object object_ref="obj_env_has_nss-pam-ldapd_installed" />
0cd8e1
+  </linux:rpminfo_test>
0cd8e1
+  <linux:rpminfo_object id="obj_env_has_nss-pam-ldapd_installed" version="1">
0cd8e1
+    <linux:name>nss-pam-ldapd</linux:name>
0cd8e1
+  </linux:rpminfo_object>
0cd8e1
+
0cd8e1
+</def-group>
0cd8e1
diff --git a/ssg/constants.py b/ssg/constants.py
0cd8e1
index 8b3a792f10..8d7a4cc290 100644
0cd8e1
--- a/ssg/constants.py
0cd8e1
+++ b/ssg/constants.py
0cd8e1
@@ -377,6 +377,7 @@
0cd8e1
     "machine": "cpe:/a:machine",
0cd8e1
     "container": "cpe:/a:container",
0cd8e1
     "libuser": "cpe:/a:libuser",
0cd8e1
+    "nss-pam-ldapd": "cpe:/a:nss-pam-ldapd",
0cd8e1
     "pam": "cpe:/a:pam",
0cd8e1
     "shadow-utils": "cpe:/a:shadow-utils",
0cd8e1
     "systemd": "cpe:/a:systemd",
0cd8e1
0cd8e1
From 7cbbe94a051f3978592edb207b5fb178fd6d0e2f Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 15:55:08 +0200
0cd8e1
Subject: [PATCH 08/11] Update FIPS checks to evaluate if in machine
0cd8e1
 environment
0cd8e1
0cd8e1
---
0cd8e1
 .../integrity/fips/grub_legacy_enable_fips_mode.rule        | 2 ++
0cd8e1
 .../integrity/fips/package_dracut-fips_installed.rule       | 2 ++
0cd8e1
 3 files changed, 6 insertions(+)
0cd8e1
0cd8e1
diff --git a/linux_os/guide/system/software/integrity/fips/grub_legacy_enable_fips_mode.rule b/linux_os/guide/system/software/integrity/fips/grub_legacy_enable_fips_mode.rule
0cd8e1
index f112bddacd..6761b8736d 100644
0cd8e1
--- a/linux_os/guide/system/software/integrity/fips/grub_legacy_enable_fips_mode.rule
0cd8e1
+++ b/linux_os/guide/system/software/integrity/fips/grub_legacy_enable_fips_mode.rule
0cd8e1
@@ -50,3 +50,5 @@ warnings:
0cd8e1
         

0cd8e1
         See {{{ weblink(link="http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/1401vend.htm") }}}
0cd8e1
         for a list of FIPS certified vendors.
0cd8e1
+
0cd8e1
+platform: machine
0cd8e1
diff --git a/linux_os/guide/system/software/integrity/fips/package_dracut-fips_installed.rule b/linux_os/guide/system/software/integrity/fips/package_dracut-fips_installed.rule
0cd8e1
index c1f6e515e6..055ec8f774 100644
0cd8e1
--- a/linux_os/guide/system/software/integrity/fips/package_dracut-fips_installed.rule
0cd8e1
+++ b/linux_os/guide/system/software/integrity/fips/package_dracut-fips_installed.rule
0cd8e1
@@ -37,3 +37,5 @@ references:
0cd8e1
 ocil_clause: 'the package is not installed'
0cd8e1
 
0cd8e1
 ocil: '{{{ ocil_package(package="dracut-fips") }}}'
0cd8e1
+
0cd8e1
+platform: machine
0cd8e1
0cd8e1
From 86704595eb3500a8ef15f5fc0c1412d000c201d1 Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 16:15:45 +0200
0cd8e1
Subject: [PATCH 09/11] Update CPE package check to handle deb packages
0cd8e1
0cd8e1
---
0cd8e1
 .../oval/installed_env_has_libuser_package.xml    | 15 ++++++++++++++-
0cd8e1
 .../installed_env_has_nss-pam-ldapd_package.xml   | 15 ++++++++++++++-
0cd8e1
 .../checks/oval/installed_env_has_pam_package.xml | 15 ++++++++++++++-
0cd8e1
 .../installed_env_has_shadow-utils_package.xml    | 15 ++++++++++++++-
0cd8e1
 .../oval/installed_env_has_systemd_package.xml    | 15 ++++++++++++++-
0cd8e1
 5 files changed, 70 insertions(+), 5 deletions(-)
0cd8e1
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_libuser_package.xml b/shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
index ee79b19f8a..b848337b0e 100644
0cd8e1
--- a/shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
+++ b/shared/checks/oval/installed_env_has_libuser_package.xml
0cd8e1
@@ -14,11 +14,24 @@
0cd8e1
     </criteria>
0cd8e1
   </definition>
0cd8e1
 
0cd8e1
-  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package libuser installed" id="test_env_has_libuser_installed" version="1">
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_libuser_installed" version="1"
0cd8e1
+  comment="system has package libuser installed">
0cd8e1
     <linux:object object_ref="obj_env_has_libuser_installed" />
0cd8e1
   </linux:rpminfo_test>
0cd8e1
   <linux:rpminfo_object id="obj_env_has_libuser_installed" version="1">
0cd8e1
     <linux:name>libuser</linux:name>
0cd8e1
   </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_libuser_installed" version="1"
0cd8e1
+  comment="system has package libuser installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_libuser_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_libuser_installed" version="1">
0cd8e1
+    <linux:name>libuser</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
 
0cd8e1
 </def-group>
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml b/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
index 0637e4a64e..748f68f60f 100644
0cd8e1
--- a/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
+++ b/shared/checks/oval/installed_env_has_nss-pam-ldapd_package.xml
0cd8e1
@@ -14,11 +14,24 @@
0cd8e1
     </criteria>
0cd8e1
   </definition>
0cd8e1
 
0cd8e1
-  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package nss-pam-ldapd installed" id="test_env_has_nss-pam-ldapd_installed" version="1">
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_nss-pam-ldapd_installed" version="1"
0cd8e1
+  comment="system has package nss-pam-ldapd installed">
0cd8e1
     <linux:object object_ref="obj_env_has_nss-pam-ldapd_installed" />
0cd8e1
   </linux:rpminfo_test>
0cd8e1
   <linux:rpminfo_object id="obj_env_has_nss-pam-ldapd_installed" version="1">
0cd8e1
     <linux:name>nss-pam-ldapd</linux:name>
0cd8e1
   </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_nss-pam-ldapd_installed" version="1"
0cd8e1
+  comment="system has package nss-pam-ldapd installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_nss-pam-ldapd_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_nss-pam-ldapd_installed" version="1">
0cd8e1
+    <linux:name>nss-pam-ldapd</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
 
0cd8e1
 </def-group>
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_pam_package.xml b/shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
index b6376575b2..dee3bcd26f 100644
0cd8e1
--- a/shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
+++ b/shared/checks/oval/installed_env_has_pam_package.xml
0cd8e1
@@ -15,11 +15,24 @@
0cd8e1
     </criteria>
0cd8e1
   </definition>
0cd8e1
 
0cd8e1
-  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package pam installed" id="test_env_has_pam_installed" version="1">
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_pam_installed" version="1"
0cd8e1
+  comment="system has package pam installed">
0cd8e1
     <linux:object object_ref="obj_env_has_pam_installed" />
0cd8e1
   </linux:rpminfo_test>
0cd8e1
   <linux:rpminfo_object id="obj_env_has_pam_installed" version="1">
0cd8e1
     <linux:name>pam</linux:name>
0cd8e1
   </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_pam_installed" version="1"
0cd8e1
+  comment="system has package pam installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_pam_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_pam_installed" version="1">
0cd8e1
+    <linux:name>pam</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
 
0cd8e1
 </def-group>
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_shadow-utils_package.xml b/shared/checks/oval/installed_env_has_shadow-utils_package.xml
0cd8e1
index 12dd5bd565..11f40a324f 100644
0cd8e1
--- a/shared/checks/oval/installed_env_has_shadow-utils_package.xml
0cd8e1
+++ b/shared/checks/oval/installed_env_has_shadow-utils_package.xml
0cd8e1
@@ -14,11 +14,24 @@
0cd8e1
     </criteria>
0cd8e1
   </definition>
0cd8e1
 
0cd8e1
-  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package shadow-utils installed" id="test_env_has_shadow-utils_installed" version="1">
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_shadow-utils_installed" version="1"
0cd8e1
+  comment="system has package shadow-utils installed">
0cd8e1
     <linux:object object_ref="obj_env_has_shadow-utils_installed" />
0cd8e1
   </linux:rpminfo_test>
0cd8e1
   <linux:rpminfo_object id="obj_env_has_shadow-utils_installed" version="1">
0cd8e1
     <linux:name>shadow-utils</linux:name>
0cd8e1
   </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_shadow-utils_installed" version="1"
0cd8e1
+  comment="system has package shadow-utils installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_shadow-utils_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_shadow-utils_installed" version="1">
0cd8e1
+    <linux:name>shadow-utils</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
 
0cd8e1
 </def-group>
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_systemd_package.xml b/shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
index 99706ee1c6..2dfdff10cc 100644
0cd8e1
--- a/shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
+++ b/shared/checks/oval/installed_env_has_systemd_package.xml
0cd8e1
@@ -14,11 +14,24 @@
0cd8e1
     </criteria>
0cd8e1
   </definition>
0cd8e1
 
0cd8e1
-  <linux:rpminfo_test check="all" check_existence="at_least_one_exists" comment="system has package systemd installed" id="test_env_has_systemd_installed" version="1">
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_systemd_installed" version="1"
0cd8e1
+  comment="system has package systemd installed">
0cd8e1
     <linux:object object_ref="obj_env_has_systemd_installed" />
0cd8e1
   </linux:rpminfo_test>
0cd8e1
   <linux:rpminfo_object id="obj_env_has_systemd_installed" version="1">
0cd8e1
     <linux:name>systemd</linux:name>
0cd8e1
   </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_systemd_installed" version="1"
0cd8e1
+  comment="system has package systemd installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_systemd_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_systemd_installed" version="1">
0cd8e1
+    <linux:name>systemd</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
 
0cd8e1
 </def-group>
0cd8e1
0cd8e1
From d8dfd5c10412bc3ecd180325c4a1cc997e6e2b8f Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 16:25:27 +0200
0cd8e1
Subject: [PATCH 10/11] Add yum CPE and update rules plaforms
0cd8e1
0cd8e1
---
0cd8e1
 .../clean_components_post_updating.rule   |  2 +
0cd8e1
 ....rule                                  |  2 +
0cd8e1
 .../ensure_gpgcheck_local_packages.rule   |  2 +
0cd8e1
 .../ensure_gpgcheck_repo_metadata.rule    |  2 +
0cd8e1
 .../oval/installed_env_has_yum_package.xml    | 37 +++++++++++++++++++
0cd8e1
 ssg/constants.py                              |  1 +
0cd8e1
 6 files changed, 46 insertions(+)
0cd8e1
 create mode 100644 shared/checks/oval/installed_env_has_yum_package.xml
0cd8e1
0cd8e1
diff --git a/linux_os/guide/system/software/updating/clean_components_post_updating.rule b/linux_os/guide/system/software/updating/clean_components_post_updating.rule
0cd8e1
index d5f0756c2a..9bbcadea11 100644
0cd8e1
--- a/linux_os/guide/system/software/updating/clean_components_post_updating.rule
0cd8e1
+++ b/linux_os/guide/system/software/updating/clean_components_post_updating.rule
0cd8e1
@@ -40,3 +40,5 @@ ocil: |-
0cd8e1
     
$ grep clean_requirements_on_remove /etc/yum.conf
0cd8e1
     The output should return something similar to:
0cd8e1
     
clean_requirements_on_remove=1
0cd8e1
+
0cd8e1
+platform: yum
0cd8e1
diff --git a/linux_os/guide/system/software/updating/ensure_gpgcheck_globally_activated.rule b/linux_os/guide/system/software/updating/ensure_gpgcheck_globally_activated.rule
0cd8e1
index 73e29ae1a5..b19e178026 100644
0cd8e1
--- a/linux_os/guide/system/software/updating/ensure_gpgcheck_globally_activated.rule
0cd8e1
+++ b/linux_os/guide/system/software/updating/ensure_gpgcheck_globally_activated.rule
0cd8e1
@@ -67,3 +67,5 @@ ocil: |-
0cd8e1
     A value of <tt>1</tt> indicates that <tt>gpgcheck</tt> is enabled. Absence of a
0cd8e1
     <tt>gpgcheck</tt> line or a setting of <tt>0</tt> indicates that it is
0cd8e1
     disabled.
0cd8e1
+
0cd8e1
+platform: yum
0cd8e1
diff --git a/linux_os/guide/system/software/updating/ensure_gpgcheck_local_packages.rule b/linux_os/guide/system/software/updating/ensure_gpgcheck_local_packages.rule
0cd8e1
index 7d94688af4..d1ffba4d4e 100644
0cd8e1
--- a/linux_os/guide/system/software/updating/ensure_gpgcheck_local_packages.rule
0cd8e1
+++ b/linux_os/guide/system/software/updating/ensure_gpgcheck_local_packages.rule
0cd8e1
@@ -47,3 +47,5 @@ ocil: |-
0cd8e1
     
$ grep localpkg_gpgcheck /etc/yum.conf
0cd8e1
     The output should return something similar to:
0cd8e1
     
localpkg_gpgcheck=1
0cd8e1
+
0cd8e1
+platform: yum
0cd8e1
diff --git a/linux_os/guide/system/software/updating/ensure_gpgcheck_repo_metadata.rule b/linux_os/guide/system/software/updating/ensure_gpgcheck_repo_metadata.rule
0cd8e1
index aa3aa83f70..4f8a76652c 100644
0cd8e1
--- a/linux_os/guide/system/software/updating/ensure_gpgcheck_repo_metadata.rule
0cd8e1
+++ b/linux_os/guide/system/software/updating/ensure_gpgcheck_repo_metadata.rule
0cd8e1
@@ -55,3 +55,5 @@ ocil: |-
0cd8e1
     
$ grep repo_gpgcheck /etc/yum.conf
0cd8e1
     The output should return something similar to:
0cd8e1
     
repo_gpgcheck=1
0cd8e1
+
0cd8e1
+platform: yum
0cd8e1
diff --git a/shared/checks/oval/installed_env_has_yum_package.xml b/shared/checks/oval/installed_env_has_yum_package.xml
0cd8e1
new file mode 100644
0cd8e1
index 0000000000..916d568062
0cd8e1
--- /dev/null
0cd8e1
+++ b/shared/checks/oval/installed_env_has_yum_package.xml
0cd8e1
@@ -0,0 +1,37 @@
0cd8e1
+<def-group>
0cd8e1
+  
0cd8e1
+  id="installed_env_has_yum_package" version="1">
0cd8e1
+    <metadata>
0cd8e1
+      <title>Package yum is installed</title>
0cd8e1
+      <affected family="unix">
0cd8e1
+        <platform>multi_platform_all</platform>
0cd8e1
+      </affected>
0cd8e1
+      <description>Checks if package yum is installed.</description>
0cd8e1
+      <reference ref_id="cpe:/a:yum" source="CPE" />
0cd8e1
+    </metadata>
0cd8e1
+    <criteria>
0cd8e1
+      <criterion comment="Package yum is installed" test_ref="test_env_has_yum_installed" />
0cd8e1
+    </criteria>
0cd8e1
+  </definition>
0cd8e1
+
0cd8e1
+{{% if pkg_system == "rpm" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_yum_installed" version="1"
0cd8e1
+  comment="system has package yum installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_yum_installed" />
0cd8e1
+  </linux:rpminfo_test>
0cd8e1
+  <linux:rpminfo_object id="obj_env_has_yum_installed" version="1">
0cd8e1
+    <linux:name>yum</linux:name>
0cd8e1
+  </linux:rpminfo_object>
0cd8e1
+{{% elif pkg_system == "dpkg" %}}
0cd8e1
+  
0cd8e1
+  id="test_env_has_yum_installed" version="1"
0cd8e1
+  comment="system has package yum installed">
0cd8e1
+    <linux:object object_ref="obj_env_has_yum_installed" />
0cd8e1
+  </linux:dpkginfo_test>
0cd8e1
+  <linux:dpkginfo_object id="obj_env_has_yum_installed" version="1">
0cd8e1
+    <linux:name>yum</linux:name>
0cd8e1
+  </linux:dpkginfo_object>
0cd8e1
+{{% endif %}}
0cd8e1
+
0cd8e1
+</def-group>
0cd8e1
diff --git a/ssg/constants.py b/ssg/constants.py
0cd8e1
index 8d7a4cc290..94d9d8c180 100644
0cd8e1
--- a/ssg/constants.py
0cd8e1
+++ b/ssg/constants.py
0cd8e1
@@ -381,6 +381,7 @@
0cd8e1
     "pam": "cpe:/a:pam",
0cd8e1
     "shadow-utils": "cpe:/a:shadow-utils",
0cd8e1
     "systemd": "cpe:/a:systemd",
0cd8e1
+    "yum": "cpe:/a:yum",
0cd8e1
 }
0cd8e1
 
0cd8e1
 # Application constants
0cd8e1
0cd8e1
From b7250b641c3d533d10a8e633094cf6421b0c34dc Mon Sep 17 00:00:00 2001
0cd8e1
From: Watson Sato <wsato@redhat.com>
0cd8e1
Date: Mon, 8 Apr 2019 18:00:19 +0200
0cd8e1
Subject: [PATCH 11/11] Update rhel7 cpe-dictionary
0cd8e1
0cd8e1
---
0cd8e1
 rhel7/cpe/rhel7-cpe-dictionary.xml | 25 +++++++++++++++++++++++++
0cd8e1
 1 file changed, 25 insertions(+)
0cd8e1
0cd8e1
diff --git a/rhel7/cpe/rhel7-cpe-dictionary.xml b/rhel7/cpe/rhel7-cpe-dictionary.xml
0cd8e1
index 44fe06f103..d64c18e846 100644
0cd8e1
--- a/rhel7/cpe/rhel7-cpe-dictionary.xml
0cd8e1
+++ b/rhel7/cpe/rhel7-cpe-dictionary.xml
0cd8e1
@@ -47,9 +47,34 @@
0cd8e1
             
0cd8e1
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_is_a_machine</check>
0cd8e1
       </cpe-item>
0cd8e1
+      <cpe-item name="cpe:/a:libuser">
0cd8e1
+            <title xml:lang="en-us">Package libuser is installed</title>
0cd8e1
+            
0cd8e1
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_libuser_package</check>
0cd8e1
+      </cpe-item>
0cd8e1
+      <cpe-item name="cpe:/a:nss-pam-ldapd">
0cd8e1
+            <title xml:lang="en-us">Package nss-pam-ldapd is installed</title>
0cd8e1
+            
0cd8e1
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_nss-pam-ldapd_package</check>
0cd8e1
+      </cpe-item>
0cd8e1
+      <cpe-item name="cpe:/a:pam">
0cd8e1
+            <title xml:lang="en-us">Package pam is installed</title>
0cd8e1
+            
0cd8e1
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_pam_package</check>
0cd8e1
+      </cpe-item>
0cd8e1
       <cpe-item name="cpe:/a:shadow-utils">
0cd8e1
             <title xml:lang="en-us">Package shadow-utils is installed</title>
0cd8e1
             
0cd8e1
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_shadow-utils_package</check>
0cd8e1
       </cpe-item>
0cd8e1
+      <cpe-item name="cpe:/a:systemd">
0cd8e1
+            <title xml:lang="en-us">Package systemd is installed</title>
0cd8e1
+            
0cd8e1
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_systemd_package</check>
0cd8e1
+      </cpe-item>
0cd8e1
+      <cpe-item name="cpe:/a:yum">
0cd8e1
+            <title xml:lang="en-us">Package yum is installed</title>
0cd8e1
+            
0cd8e1
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="filename">installed_env_has_yum_package</check>
0cd8e1
+      </cpe-item>
0cd8e1
 </cpe-list>