|
|
df3ea4 |
From 939d1cfd84b980e3a96dd1d82dfddcabf4b2a34a Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Fri, 8 Dec 2017 15:14:26 +0100
|
|
|
df3ea4 |
Subject: [PATCH 1/6] Drop check of package in sshd_required definitions
|
|
|
df3ea4 |
|
|
|
df3ea4 |
This is not the best place to check if openssh-server is installed.
|
|
|
df3ea4 |
|
|
|
df3ea4 |
We can check for openssh-server package when sshd is required and not
|
|
|
df3ea4 |
required.
|
|
|
df3ea4 |
But when sshd_required is not set, we don't check if openssh-server is
|
|
|
df3ea4 |
installed or not, because both are valid states.
|
|
|
df3ea4 |
|
|
|
df3ea4 |
This gives the impression that when extending sshd_required_or_unset
|
|
|
df3ea4 |
and sshd_not_required_or_unset there is no need to check for
|
|
|
df3ea4 |
openssh-server package, which is not true.
|
|
|
df3ea4 |
|
|
|
df3ea4 |
The only purpose of these definitions should be to check for state of
|
|
|
df3ea4 |
sshd_required value.
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
shared/checks/oval/sshd_not_required_or_unset.xml | 6 +-----
|
|
|
df3ea4 |
shared/checks/oval/sshd_required_or_unset.xml | 6 +-----
|
|
|
df3ea4 |
2 files changed, 2 insertions(+), 10 deletions(-)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_not_required_or_unset.xml b/shared/checks/oval/sshd_not_required_or_unset.xml
|
|
|
df3ea4 |
index 76bf1b9b4..206b1b474 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_not_required_or_unset.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_not_required_or_unset.xml
|
|
|
df3ea4 |
@@ -9,11 +9,7 @@
|
|
|
df3ea4 |
<description>If SSHD is not required, we check it is not installed. If SSH requirement is unset, we are good.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
<criteria comment="SSH not required or not set" operator="OR">
|
|
|
df3ea4 |
- <criteria comment="SSH is not required and not installed" operator="AND">
|
|
|
df3ea4 |
- <criterion test_ref="test_sshd_not_required" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
- </criteria>
|
|
|
df3ea4 |
+ <criterion test_ref="test_sshd_not_required" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
definition_ref="sshd_requirement_unset" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_required_or_unset.xml b/shared/checks/oval/sshd_required_or_unset.xml
|
|
|
df3ea4 |
index 04d6a687b..4518b181f 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_required_or_unset.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_required_or_unset.xml
|
|
|
df3ea4 |
@@ -9,11 +9,7 @@
|
|
|
df3ea4 |
<description>If SSHD is required, we check it is installed. If SSH requirement is unset, we are good.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
<criteria comment="SSH required or not set" operator="OR">
|
|
|
df3ea4 |
- <criteria comment="SSH is required and installed" operator="AND">
|
|
|
df3ea4 |
- <criterion test_ref="test_sshd_required" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
- </criteria>
|
|
|
df3ea4 |
+ <criterion test_ref="test_sshd_required" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
definition_ref="sshd_requirement_unset" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
|
|
|
df3ea4 |
From 0b02493e535e9b529af9eb71bf97f5b02d04c89e Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Wed, 13 Dec 2017 18:09:47 +0100
|
|
|
df3ea4 |
Subject: [PATCH 2/6] Also check state openssh-server package when
|
|
|
df3ea4 |
sshd_required is unset
|
|
|
df3ea4 |
|
|
|
df3ea4 |
Explicitly check state of openssh-server package.
|
|
|
df3ea4 |
When openssh-server is installed, system should be configured, when not
|
|
|
df3ea4 |
installed, system is ok.
|
|
|
df3ea4 |
When sshd_required is set, either to required or not required, they act
|
|
|
df3ea4 |
as selector of openssh-server package state. If sshd_required is unset,
|
|
|
df3ea4 |
the state of openssh-server package selects whether system should be
|
|
|
df3ea4 |
configured or not.
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_disable_compression.xml | 14 ++++++++++----
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_disable_gssapi_auth.xml | 14 ++++++++++----
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_disable_kerb_auth.xml | 14 ++++++++++----
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_enable_strictmodes.xml | 14 ++++++++++----
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_use_approved_macs.xml | 14 ++++++++++----
|
|
|
df3ea4 |
rhel7/checks/oval/sshd_use_priv_separation.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/disable_host_auth.xml | 15 +++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_allow_only_protocol2.xml | 15 +++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_disable_empty_passwords.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_disable_rhosts.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_disable_rhosts_rsa.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_disable_root_login.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_disable_user_known_hosts.xml | 15 +++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_do_not_permit_user_env.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_enable_warning_banner.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_enable_x11_forwarding.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_print_last_log.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_set_idle_timeout.xml | 18 ++++++++++++------
|
|
|
df3ea4 |
shared/checks/oval/sshd_set_keepalive.xml | 14 ++++++++++----
|
|
|
df3ea4 |
shared/checks/oval/sshd_use_approved_ciphers.xml | 18 ++++++++++++------
|
|
|
df3ea4 |
shared/checks/oval/sshd_use_approved_macs.xml | 14 ++++++++++----
|
|
|
df3ea4 |
21 files changed, 217 insertions(+), 88 deletions(-)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_disable_compression.xml b/rhel7/checks/oval/sshd_disable_compression.xml
|
|
|
df3ea4 |
index 8a4334f06..014741fe1 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_disable_compression.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_disable_compression.xml
|
|
|
df3ea4 |
@@ -7,13 +7,19 @@
|
|
|
df3ea4 |
</affected>
|
|
|
df3ea4 |
<description>SSH should either have compression disabled or set to delayed.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_disable_compression" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_disable_gssapi_auth.xml b/rhel7/checks/oval/sshd_disable_gssapi_auth.xml
|
|
|
df3ea4 |
index ee184b8e8..5f32edc1e 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_disable_gssapi_auth.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_disable_gssapi_auth.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Unless needed, disable the GSSAPI authentication option for
|
|
|
df3ea4 |
the SSH Server.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_disable_gssapi_auth" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_disable_kerb_auth.xml b/rhel7/checks/oval/sshd_disable_kerb_auth.xml
|
|
|
df3ea4 |
index c63cef03e..6f0e0babe 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_disable_kerb_auth.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_disable_kerb_auth.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Unless needed, disable the Kerberos authentication option for
|
|
|
df3ea4 |
the SSH Server.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_disable_kerb_auth" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_enable_strictmodes.xml b/rhel7/checks/oval/sshd_enable_strictmodes.xml
|
|
|
df3ea4 |
index 1346191d5..7728f6ae6 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_enable_strictmodes.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_enable_strictmodes.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Enable StrictMode to check users home directory permissions
|
|
|
df3ea4 |
and configurations.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_enable_strictmodes" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_use_approved_macs.xml b/rhel7/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
index bd05a5152..20b57041b 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
@@ -9,13 +9,19 @@
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
<criteria operator="AND">
|
|
|
df3ea4 |
<extend_definition comment="Installed OS is certified" definition_ref="installed_OS_is_certified" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_use_approved_macs" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/rhel7/checks/oval/sshd_use_priv_separation.xml b/rhel7/checks/oval/sshd_use_priv_separation.xml
|
|
|
df3ea4 |
index c5ae32c27..2ec883fea 100644
|
|
|
df3ea4 |
--- a/rhel7/checks/oval/sshd_use_priv_separation.xml
|
|
|
df3ea4 |
+++ b/rhel7/checks/oval/sshd_use_priv_separation.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Use priviledge separation to cause the SSH process to drop
|
|
|
df3ea4 |
root privileges when not needed.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_use_priv_separation" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/disable_host_auth.xml b/shared/checks/oval/disable_host_auth.xml
|
|
|
df3ea4 |
index 3e4cc5aea..3a00964ab 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/disable_host_auth.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/disable_host_auth.xml
|
|
|
df3ea4 |
@@ -7,12 +7,19 @@
|
|
|
df3ea4 |
</affected>
|
|
|
df3ea4 |
<description>SSH host-based authentication should be disabled.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
- <criteria comment="SSH is not installed or conditions are met" operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ operator="OR">
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_hostbasedauthentication" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_allow_only_protocol2.xml b/shared/checks/oval/sshd_allow_only_protocol2.xml
|
|
|
df3ea4 |
index 0a7ace128..224010263 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_allow_only_protocol2.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_allow_only_protocol2.xml
|
|
|
df3ea4 |
@@ -9,12 +9,19 @@
|
|
|
df3ea4 |
</affected>
|
|
|
df3ea4 |
<description>The OpenSSH daemon should be running protocol 2.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
- <criteria comment="SSH is not installed or conditions are met" operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ operator="OR">
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
<criteria comment="SSH version is equal or higher than 7.4 or it is configured with protocol 2" operator="OR">
|
|
|
df3ea4 |
<extend_definition comment="OpenSSH version 7.4 or higher supports only protocol 2" definition_ref="sshd_version_equal_or_higher_than_74" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_disable_empty_passwords.xml b/shared/checks/oval/sshd_disable_empty_passwords.xml
|
|
|
df3ea4 |
index e923d64fd..9570ee5c7 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_disable_empty_passwords.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_disable_empty_passwords.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Remote connections from accounts with empty passwords should
|
|
|
df3ea4 |
be disabled (and dependencies are met)</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
negate="true" test_ref="test_sshd_permitemptypasswords_no" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_disable_rhosts.xml b/shared/checks/oval/sshd_disable_rhosts.xml
|
|
|
df3ea4 |
index 86eb94a22..163ccfca5 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_disable_rhosts.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_disable_rhosts.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Emulation of the rsh command through the ssh server should
|
|
|
df3ea4 |
be disabled (and dependencies are met)</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_rsh_emulation_disabled" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_disable_rhosts_rsa.xml b/shared/checks/oval/sshd_disable_rhosts_rsa.xml
|
|
|
df3ea4 |
index 2abf88c70..e949fb031 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_disable_rhosts_rsa.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_disable_rhosts_rsa.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>SSH can allow authentication through the obsolete rsh command
|
|
|
df3ea4 |
through the use of the authenticating user's SSH keys. This should be disabled.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
<criteria comment="SSH version is equal or higher than 7.4 has deprecated RhostsRSAAuthentication" operator="OR">
|
|
|
df3ea4 |
<extend_definition comment="OpenSSH version 7.4 or higher has deprecated RhostsRSAAuthentication" definition_ref="sshd_version_equal_or_higher_than_74" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_disable_root_login.xml b/shared/checks/oval/sshd_disable_root_login.xml
|
|
|
df3ea4 |
index 7bfd54d4e..10e7afb18 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_disable_root_login.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_disable_root_login.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Root login via SSH should be disabled (and dependencies are
|
|
|
df3ea4 |
met)</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
negate="true" test_ref="test_sshd_permitrootlogin_no" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_disable_user_known_hosts.xml b/shared/checks/oval/sshd_disable_user_known_hosts.xml
|
|
|
df3ea4 |
index cc01ec6ca..0e121d496 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_disable_user_known_hosts.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_disable_user_known_hosts.xml
|
|
|
df3ea4 |
@@ -9,12 +9,19 @@
|
|
|
df3ea4 |
to connect to systems if a cache of the remote systems public keys are available.
|
|
|
df3ea4 |
This should be disabled.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
- <criteria comment="SSH is not installed or conditions are met" operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ operator="OR">
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_disable_user_known_hosts" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_do_not_permit_user_env.xml b/shared/checks/oval/sshd_do_not_permit_user_env.xml
|
|
|
df3ea4 |
index ad8ecdf68..afb799e20 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_do_not_permit_user_env.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_do_not_permit_user_env.xml
|
|
|
df3ea4 |
@@ -7,13 +7,19 @@
|
|
|
df3ea4 |
</affected>
|
|
|
df3ea4 |
<description>PermitUserEnvironment should be disabled</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
negate="true" test_ref="test_sshd_no_user_envset" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_enable_warning_banner.xml b/shared/checks/oval/sshd_enable_warning_banner.xml
|
|
|
df3ea4 |
index 933822eb6..cd14ec9e9 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_enable_warning_banner.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_enable_warning_banner.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>SSH warning banner should be enabled (and dependencies are
|
|
|
df3ea4 |
met)</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_banner_set" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_enable_x11_forwarding.xml b/shared/checks/oval/sshd_enable_x11_forwarding.xml
|
|
|
df3ea4 |
index 3aa45e51b..0a0e1bafd 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_enable_x11_forwarding.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_enable_x11_forwarding.xml
|
|
|
df3ea4 |
@@ -7,13 +7,19 @@
|
|
|
df3ea4 |
</affected>
|
|
|
df3ea4 |
<description>Enable X11Forwarding to encrypt X11 remote connections over SSH.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_enable_x11_forwarding" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_print_last_log.xml b/shared/checks/oval/sshd_print_last_log.xml
|
|
|
df3ea4 |
index 29367969d..83bc0df79 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_print_last_log.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_print_last_log.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>Enable PrintLastLog to display user's last login time
|
|
|
df3ea4 |
and date.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_enable_printlastlog" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_set_idle_timeout.xml b/shared/checks/oval/sshd_set_idle_timeout.xml
|
|
|
df3ea4 |
index a414790a0..180e87d83 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_set_idle_timeout.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_set_idle_timeout.xml
|
|
|
df3ea4 |
@@ -8,14 +8,20 @@
|
|
|
df3ea4 |
<description>The SSH idle timeout interval should be set to an
|
|
|
df3ea4 |
appropriate value.</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
- <criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
+ <criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
test_ref="test_sshd_idle_timeout" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_set_keepalive.xml b/shared/checks/oval/sshd_set_keepalive.xml
|
|
|
df3ea4 |
index 5640638ae..8774e1d25 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_set_keepalive.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_set_keepalive.xml
|
|
|
df3ea4 |
@@ -8,13 +8,19 @@
|
|
|
df3ea4 |
<description>The SSH ClientAliveCountMax should be set to an appropriate
|
|
|
df3ea4 |
value (and dependencies are met)</description>
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_clientalivecountmax" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_use_approved_ciphers.xml b/shared/checks/oval/sshd_use_approved_ciphers.xml
|
|
|
df3ea4 |
index 84088aa5c..5a4e3a1f9 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_use_approved_ciphers.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_use_approved_ciphers.xml
|
|
|
df3ea4 |
@@ -9,13 +9,19 @@
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
<criteria operator="AND">
|
|
|
df3ea4 |
<extend_definition comment="Installed OS is certified" definition_ref="installed_OS_is_certified" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
- <criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
+ <criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_use_approved_ciphers" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
diff --git a/shared/checks/oval/sshd_use_approved_macs.xml b/shared/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
index d2f622af1..b403d0449 100644
|
|
|
df3ea4 |
--- a/shared/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
+++ b/shared/checks/oval/sshd_use_approved_macs.xml
|
|
|
df3ea4 |
@@ -9,13 +9,19 @@
|
|
|
df3ea4 |
</metadata>
|
|
|
df3ea4 |
<criteria operator="AND">
|
|
|
df3ea4 |
<extend_definition comment="Installed OS is certified" definition_ref="installed_OS_is_certified" />
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
operator="OR">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
- definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+ <criteria comment="sshd is not installed" operator="AND">
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="sshd_not_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_removed" />
|
|
|
df3ea4 |
+ </criteria>
|
|
|
df3ea4 |
<criteria comment="sshd is installed and configured" operator="AND">
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
definition_ref="sshd_required_or_unset" />
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+ definition_ref="package_openssh-server_installed" />
|
|
|
df3ea4 |
|
|
|
df3ea4 |
test_ref="test_sshd_use_approved_macs" />
|
|
|
df3ea4 |
</criteria>
|
|
|
df3ea4 |
|
|
|
df3ea4 |
From 441881052627a5b14be015d74d36d271f9268908 Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Wed, 13 Dec 2017 18:22:29 +0100
|
|
|
df3ea4 |
Subject: [PATCH 3/6] Remove backslashes from echo command
|
|
|
df3ea4 |
|
|
|
df3ea4 |
Echo command output is literal, there is no need for backslashes
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
.../rule_sshd_use_approved_ciphers/correct_scrambled.pass.sh | 2 +-
|
|
|
df3ea4 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_approved_ciphers/correct_scrambled.pass.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_approved_ciphers/correct_scrambled.pass.sh
|
|
|
df3ea4 |
index 227611543..7172539c7 100644
|
|
|
df3ea4 |
--- a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_approved_ciphers/correct_scrambled.pass.sh
|
|
|
df3ea4 |
+++ b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_approved_ciphers/correct_scrambled.pass.sh
|
|
|
df3ea4 |
@@ -5,5 +5,5 @@
|
|
|
df3ea4 |
if grep -q "^Ciphers" /etc/ssh/sshd_config; then
|
|
|
df3ea4 |
sed -i "s/^Ciphers.*/Ciphers aes128-ctr,aes192-ctr,aes192-cbc,aes256-cbc,aes256-ctr,aes128-cbc,3des-cbc,rijndael-cbc@lysator\.liu\.se/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
else
|
|
|
df3ea4 |
- echo "Ciphers aes128-ctr,aes192-ctr,aes192-cbc,aes256-cbc,aes256-ctr,aes128-cbc,3des-cbc,rijndael-cbc@lysator\.liu\.se" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
+ echo "Ciphers aes128-ctr,aes192-ctr,aes192-cbc,aes256-cbc,aes256-ctr,aes128-cbc,3des-cbc,rijndael-cbc@lysator.liu.se" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
fi
|
|
|
df3ea4 |
|
|
|
df3ea4 |
From 995a5e64eb841c73849571395cc985f94607c4cb Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Mon, 18 Dec 2017 11:12:13 +0100
|
|
|
df3ea4 |
Subject: [PATCH 4/6] Fix test scenarios for sshd_use_priv_separation
|
|
|
df3ea4 |
|
|
|
df3ea4 |
As of PR #2162 the Rule checks for "sandbox"
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
.../rule_sshd_use_priv_separation/correct_value.pass.sh | 4 ++--
|
|
|
df3ea4 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_priv_separation/correct_value.pass.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_priv_separation/correct_value.pass.sh
|
|
|
df3ea4 |
index d63caa85b..36e8c1bba 100644
|
|
|
df3ea4 |
--- a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_priv_separation/correct_value.pass.sh
|
|
|
df3ea4 |
+++ b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_use_priv_separation/correct_value.pass.sh
|
|
|
df3ea4 |
@@ -3,7 +3,7 @@
|
|
|
df3ea4 |
# profiles = xccdf_org.ssgproject.content_profile_ospp-rhel7
|
|
|
df3ea4 |
|
|
|
df3ea4 |
if grep -q "^UsePrivilegeSeparation" /etc/ssh/sshd_config; then
|
|
|
df3ea4 |
- sed -i "s/^UsePrivilegeSeparation.*/UsePrivilegeSeparation yes/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
+ sed -i "s/^UsePrivilegeSeparation.*/UsePrivilegeSeparation sandbox/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
else
|
|
|
df3ea4 |
- echo "UsePrivilegeSeparation yes" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
+ echo "UsePrivilegeSeparation sandbox" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
fi
|
|
|
df3ea4 |
|
|
|
df3ea4 |
From 877f3620d7462e2af6727a9feff16d6a7f08a239 Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Mon, 18 Dec 2017 11:40:07 +0100
|
|
|
df3ea4 |
Subject: [PATCH 5/6] Fix test scenarios for sshd_disable_kerb_auth
|
|
|
df3ea4 |
|
|
|
df3ea4 |
As of Pr #2463, the definition checks for ausence of
|
|
|
df3ea4 |
"KerberosAuthentication yes", as default setting is not enabled.
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
.../group_ssh_server/rule_sshd_disable_kerb_auth/comment.fail.sh | 9 ---------
|
|
|
df3ea4 |
.../group_ssh_server/rule_sshd_disable_kerb_auth/comment.pass.sh | 9 +++++++++
|
|
|
df3ea4 |
.../{line_not_there.fail.sh => line_not_there.pass.sh} | 0
|
|
|
df3ea4 |
3 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
df3ea4 |
delete mode 100644 tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.fail.sh
|
|
|
df3ea4 |
create mode 100644 tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.pass.sh
|
|
|
df3ea4 |
rename tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/{line_not_there.fail.sh => line_not_there.pass.sh} (100%)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.fail.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.fail.sh
|
|
|
df3ea4 |
deleted file mode 100644
|
|
|
df3ea4 |
index 3ae082173..000000000
|
|
|
df3ea4 |
--- a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.fail.sh
|
|
|
df3ea4 |
+++ /dev/null
|
|
|
df3ea4 |
@@ -1,9 +0,0 @@
|
|
|
df3ea4 |
-#!/bin/bash
|
|
|
df3ea4 |
-#
|
|
|
df3ea4 |
-# profiles = xccdf_org.ssgproject.content_profile_ospp-rhel7
|
|
|
df3ea4 |
-
|
|
|
df3ea4 |
-if grep -q "^KerberosAuthentication" /etc/ssh/sshd_config; then
|
|
|
df3ea4 |
- sed -i "s/^KerberosAuthentication.*/# KerberosAuthentication no/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
-else
|
|
|
df3ea4 |
- echo "# KerberosAuthentication no" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
-fi
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.pass.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.pass.sh
|
|
|
df3ea4 |
new file mode 100644
|
|
|
df3ea4 |
index 000000000..c7d58fbc6
|
|
|
df3ea4 |
--- /dev/null
|
|
|
df3ea4 |
+++ b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/comment.pass.sh
|
|
|
df3ea4 |
@@ -0,0 +1,9 @@
|
|
|
df3ea4 |
+#!/bin/bash
|
|
|
df3ea4 |
+#
|
|
|
df3ea4 |
+# profiles = xccdf_org.ssgproject.content_profile_ospp-rhel7
|
|
|
df3ea4 |
+
|
|
|
df3ea4 |
+if grep -q "^KerberosAuthentication" /etc/ssh/sshd_config; then
|
|
|
df3ea4 |
+ sed -i "s/^KerberosAuthentication.*/# KerberosAuthentication yes/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
+else
|
|
|
df3ea4 |
+ echo "# KerberosAuthentication yes" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
+fi
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/line_not_there.fail.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/line_not_there.pass.sh
|
|
|
df3ea4 |
similarity index 100%
|
|
|
df3ea4 |
rename from tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/line_not_there.fail.sh
|
|
|
df3ea4 |
rename to tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_disable_kerb_auth/line_not_there.pass.sh
|
|
|
df3ea4 |
|
|
|
df3ea4 |
From 4ebe165ede448c8998251257998cc94ea5cf3786 Mon Sep 17 00:00:00 2001
|
|
|
df3ea4 |
From: Watson Sato <wsato@redhat.com>
|
|
|
df3ea4 |
Date: Mon, 18 Dec 2017 11:52:39 +0100
|
|
|
df3ea4 |
Subject: [PATCH 6/6] Fix test scenarios for sshd_enable_strictmodes
|
|
|
df3ea4 |
|
|
|
df3ea4 |
As of Pr #2463, the definition checks fo ausence of "StrictModes no", as
|
|
|
df3ea4 |
default value is enabled already.
|
|
|
df3ea4 |
---
|
|
|
df3ea4 |
.../rule_sshd_enable_strictmodes/{comment.fail.sh => comment.pass.sh} | 4 ++--
|
|
|
df3ea4 |
.../{line_not_there.fail.sh => line_not_there.pass.sh} | 0
|
|
|
df3ea4 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
df3ea4 |
rename tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/{comment.fail.sh => comment.pass.sh} (53%)
|
|
|
df3ea4 |
rename tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/{line_not_there.fail.sh => line_not_there.pass.sh} (100%)
|
|
|
df3ea4 |
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.fail.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.pass.sh
|
|
|
df3ea4 |
similarity index 53%
|
|
|
df3ea4 |
rename from tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.fail.sh
|
|
|
df3ea4 |
rename to tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.pass.sh
|
|
|
df3ea4 |
index 3d3b90875..bac02cb4f 100644
|
|
|
df3ea4 |
--- a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.fail.sh
|
|
|
df3ea4 |
+++ b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/comment.pass.sh
|
|
|
df3ea4 |
@@ -3,7 +3,7 @@
|
|
|
df3ea4 |
# profiles = xccdf_org.ssgproject.content_profile_ospp-rhel7
|
|
|
df3ea4 |
|
|
|
df3ea4 |
if grep -q "^StrictModes" /etc/ssh/sshd_config; then
|
|
|
df3ea4 |
- sed -i "s/^StrictModes.*/# StrictModes yes/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
+ sed -i "s/^StrictModes.*/# StrictModes no/" /etc/ssh/sshd_config
|
|
|
df3ea4 |
else
|
|
|
df3ea4 |
- echo "# StrictModes yes" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
+ echo "# StrictModes no" >> /etc/ssh/sshd_config
|
|
|
df3ea4 |
fi
|
|
|
df3ea4 |
diff --git a/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/line_not_there.fail.sh b/tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/line_not_there.pass.sh
|
|
|
df3ea4 |
similarity index 100%
|
|
|
df3ea4 |
rename from tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/line_not_there.fail.sh
|
|
|
df3ea4 |
rename to tests/data/group_services/group_ssh/group_ssh_server/rule_sshd_enable_strictmodes/line_not_there.pass.sh
|