Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rules SLES-15-040450 SLES-12-030270 #10639

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Red Hat Enterprise Linux 7,Oracle Linux 7
# platform = Red Hat Enterprise Linux 7,Oracle Linux 7,multi_platform_sle
svet-se marked this conversation as resolved.
Show resolved Hide resolved
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Red Hat Enterprise Linux 7,Oracle Linux 7
# platform = Red Hat Enterprise Linux 7,Oracle Linux 7,multi_platform_sle

KEX_ALGOS="ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,\
diffie-hellman-group-exchange-sha256"
Expand Down
teacup-on-rockingchair marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"diffie-hellman-group14-sha256","diffie-hellman-group16-sha512",
"diffie-hellman-group18-sha512"] %}}
{{% set sufix_conf="(\s.*)?'" %}}
{{% elif product in ['ol7','rhel7'] %}}
{{% elif product in ['ol7','rhel7','sle12','sle15'] %}}
{{% set path='/etc/ssh/sshd_config' %}}
{{% set prefix_conf="^\s*KexAlgorithms\s*" %}}
{{% set kex_algos=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521",
Expand All @@ -26,14 +26,24 @@
<criteria comment="sshd is not installed" operator="AND">
<extend_definition comment="sshd is not required or requirement is unset"
definition_ref="sshd_not_required_or_unset" />
{{% if product in ['sle12', 'sle15'] %}}
<extend_definition comment="rpm package openssh removed"
definition_ref="package_openssh_removed" />
{{% else %}}
<extend_definition comment="rpm package openssh-server removed"
definition_ref="package_openssh-server_removed" />
{{% endif %}}
</criteria>
<criteria comment="sshd is installed and configured" operator="AND">
<extend_definition comment="sshd is required or requirement is unset"
definition_ref="sshd_required_or_unset" />
{{% if product in ['sle12', 'sle15'] %}}
<extend_definition comment="rpm package openssh installed"
definition_ref="package_openssh_installed" />
{{% else %}}
<extend_definition comment="rpm package openssh-server installed"
definition_ref="package_openssh-server_installed" />
{{% endif %}}
<criterion comment="Check Kex in {{{ path }}}"
test_ref="test_{{{ rule_id }}}" />
</criteria>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
{{% set path='/etc/ssh/sshd_config' %}}
{{% set conf="KexAlgorithms ecdh-sha1-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" ~
",diffie-hellman-group-exchange-sha256" %}}
{{% elif product in ['sle12','sle15'] %}}
{{% set path='/etc/ssh/sshd_config' %}}
{{% set conf="KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" ~
",diffie-hellman-group-exchange-sha256" %}}
{{% endif %}}

documentation_complete: true

prodtype: ol7,ol8,rhel7,rhel8
prodtype: ol7,ol8,rhel7,rhel8,sle12,sle15

title: 'Use Only FIPS 140-2 Validated Key Exchange Algorithms'

Expand All @@ -35,6 +39,8 @@ severity: medium
identifiers:
cce@rhel7: CCE-86061-9
cce@rhel8: CCE-86059-3
cce@sle12: CCE-92336-7
cce@sle15: CCE-92505-7

references:
disa: CCI-001453
Expand All @@ -44,6 +50,8 @@ references:
stigid@ol8: OL08-00-040342
stigid@rhel7: RHEL-07-040712
stigid@rhel8: RHEL-08-040342
stigid@sle12: SLES-12-030270
stigid@sle15: SLES-15-040450

ocil_clause: 'KexAlgorithms option is commented out, contains non-approved algorithms, or the FIPS-approved algorithms are not in the exact order'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CONF_PREFIX="CRYPTO_POLICY='-oKexAlgorithms="
KEX_ALGOS="ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512"
CONF_SUFIX="'"
CONF_PREFIX_REGEX="^\s*CRYPTO_POLICY"
{{% elif product in ['ol7','rhel7'] %}}
{{% elif product in ['ol7','rhel7','sle12','sle15'] %}}
FILE_PATH='/etc/ssh/sshd_config'
CONF_PREFIX="KexAlgorithms "
KEX_ALGOS="ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle

source common.sh

Expand Down
1 change: 1 addition & 0 deletions products/sle12/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ selections:
- sshd_set_keepalive_0
- sshd_set_loglevel_verbose
- sshd_use_approved_ciphers
- sshd_use_approved_kex_ordered_stig
- sshd_use_approved_macs
- sshd_use_priv_separation
- sshd_x11_use_localhost
Expand Down
1 change: 1 addition & 0 deletions products/sle15/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ selections:
- sshd_set_keepalive_0
- sshd_set_loglevel_verbose
- sshd_use_approved_ciphers_ordered_stig
- sshd_use_approved_kex_ordered_stig
- sshd_use_approved_macs_ordered_stig
- sssd_memcache_timeout
- sssd_offline_cred_expiration
Expand Down
1 change: 0 additions & 1 deletion shared/references/cce-sle12-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CCE-92331-8
CCE-92332-6
CCE-92334-2
CCE-92335-9
CCE-92336-7
CCE-92337-5
CCE-92338-3
CCE-92340-9
Expand Down
1 change: 0 additions & 1 deletion shared/references/cce-sle15-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ CCE-92499-3
CCE-92500-8
CCE-92501-6
CCE-92503-2
CCE-92505-7
CCE-92506-5
CCE-92508-1
CCE-92509-9
Expand Down