Skip to content

Commit 8c8d6c7

Browse files
authored
Merge branch 'ComplianceAsCode:master' into rhel-modular-cis
2 parents b63d2be + e8f82e8 commit 8c8d6c7

File tree

27 files changed

+427
-21
lines changed

27 files changed

+427
-21
lines changed

applications/openshift/integrity/file_integrity_exists/tests/ocp4/e2e-remediation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ while [ -z "$(oc get -n openshift-file-integrity --ignore-not-found deployment/f
1212
done
1313

1414
echo "waiting for file-integrity-operator deployment to be ready"
15-
oc wait -n openshift-file-integrity --for=condition=Available --timeout=120s \
15+
oc wait -n openshift-file-integrity --for=condition=Available --timeout=300s \
1616
deployment/file-integrity-operator
1717

1818
echo "installing file-integrity instance"

docs/manual/developer/06_contributing_with_content.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,9 @@ the following to `rule.yml`:
15721572
- **oval_extend_definitions** - optional, list of additional OVAL
15731573
definitions that have to pass along the generated check.
15741574

1575+
**sed_path_separator** - optional, default is `/`, sets the sed path separator. Set this
1576+
to a character like `#` if `/` is in use in your text.
1577+
15751578
- Languages: Ansible, Bash, OVAL
15761579

15771580

File renamed without changes.

linux_os/guide/system/software/sap_host/accounts_authorized_local_users/bash/shared.sh renamed to linux_os/guide/system/accounts/accounts-restrictions/accounts_authorized_local_users/bash/shared.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ default_os_user="root"
1010
for username in $( sed 's/:.*//' /etc/passwd ) ; do
1111
if [[ ! "$username" =~ ($default_os_user|$var_accounts_authorized_local_users_regex) ]];
1212
then
13-
userdel $username ;
13+
userdel $username ;
1414
fi
1515
done
1616

linux_os/guide/system/software/sap_host/accounts_authorized_local_users/oval/shared.xml renamed to linux_os/guide/system/accounts/accounts-restrictions/accounts_authorized_local_users/oval/shared.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
var_ref="var_accounts_authorized_local_users_regex"></ind:subexpression>
3333
</ind:textfilecontent54_state>
3434

35-
<external_variable id="var_accounts_authorized_local_users_regex" version="1" datatype="string"
35+
<external_variable id="var_accounts_authorized_local_users_regex" version="1" datatype="string"
3636
comment="accounts authorized local users on operating system"/>
3737
</def-group>

linux_os/guide/system/software/sap_host/accounts_authorized_local_users/rule.yml renamed to linux_os/guide/system/accounts/accounts-restrictions/accounts_authorized_local_users/rule.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
documentation_complete: true
22

3-
prodtype: ol7,sle12,sle15
3+
prodtype: ol7,sle12,sle15,fedora,rhel8
44

55
title: 'Only Authorized Local User Accounts Exist on Operating System'
66

@@ -26,11 +26,10 @@ rationale: |-
2626
severity: medium
2727

2828
identifiers:
29+
cce@rhel8: CCE-85987-6
2930
cce@sle12: CCE-83195-8
3031
cce@sle15: CCE-85561-9
3132

32-
severity: medium
33-
3433
references:
3534
disa: CCI-000366
3635
nist@sle12: CM-6(b),CM-6.1(iv)
@@ -41,6 +40,13 @@ references:
4140

4241
ocil_clause: 'there are unauthorized local user accounts on the system'
4342

43+
{{% if 'rhel' in product %}}
44+
warnings:
45+
- general: |-
46+
Automatic remediation of this control is not available. Due the unique
47+
requirements of each system.
48+
{{% endif %}}
49+
4450
ocil: |-
4551
To verify that there are no unauthorized local user accounts, run the following command:
4652
<pre>$ less /etc/passwd </pre>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#! /bin/bash
2+
adduser testuser
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/bash
2+
# platform = multi_platform_rhel
3+
4+
var_accounts_authorized_local_users_regex="^(root|bin|daemon|adm|lp|sync|shutdown|halt|mail|operator|games|ftp|nobody|pegasus|systemd-bus-proxy|systemd-network|dbus|polkitd|abrt|unbound|tss|libstoragemgmt|rpc|colord|usbmuxd$|pcp|saslauth|geoclue|setroubleshoot|rtkit|chrony|qemu|radvd|rpcuser|nfsnobody|pulse|gdm|gnome-initial-setup|postfix|avahi|ntp|sshd|tcpdump|oprofile|uuidd)$"
5+
6+
# never delete the root user
7+
default_os_user="root"
8+
9+
# delete users that is in /etc/passwd but neither in default_os_user
10+
# nor in var_accounts_authorized_local_users_regex
11+
for username in $( sed 's/:.*//' /etc/passwd ) ; do
12+
if [[ ! "$username" =~ ($default_os_user|$var_accounts_authorized_local_users_regex) ]];
13+
then
14+
echo $username ;
15+
fi
16+
done

linux_os/guide/system/software/sap_host/var_accounts_authorized_local_users_regex.var renamed to linux_os/guide/system/accounts/accounts-restrictions/var_accounts_authorized_local_users_regex.var

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ operator: pattern match
2222
interactive: true
2323

2424
options:
25+
rhel8: "^(root|bin|daemon|adm|lp|sync|shutdown|halt|mail|operator|games|ftp|nobody|pegasus|systemd-bus-proxy|systemd-network|dbus|polkitd|abrt|unbound|tss|libstoragemgmt|rpc|colord|usbmuxd$|pcp|saslauth|geoclue|setroubleshoot|rtkit|chrony|qemu|radvd|rpcuser|nfsnobody|pulse|gdm|gnome-initial-setup|postfix|avahi|ntp|sshd|tcpdump|oprofile|uuidd|systemd-resolve|systemd-coredump|sssd|rngd)$"
2526
ol7forsap: "^(root|bin|daemon|adm|lp|sync|shutdown|halt|mail|operator|games|ftp|nobody|pegasus|systemd-bus-proxy|systemd-network|dbus|polkitd|abrt|unbound|tss|libstoragemgmt|rpc|colord|usbmuxd$|pcp|saslauth|geoclue|setroubleshoot|rtkit|chrony|qemu|radvd|rpcuser|nfsnobody|pulse|gdm|gnome-initial-setup|postfix|avahi|ntp|sshd|tcpdump|oprofile|uuidd)$"
2627
saponol7 : "^(root|bin|daemon|adm|lp|sync|shutdown|halt|mail|operator|games|ftp|nobody|pegasus|systemd-bus-proxy|systemd-network|dbus|polkitd|abrt|unbound|tss|libstoragemgmt|rpc|colord|usbmuxd$|pcp|saslauth|geoclue|setroubleshoot|rtkit|chrony|qemu|radvd|rpcuser|nfsnobody|pulse|gdm|gnome-initial-setup|postfix|avahi|ntp|sshd|tcpdump|oprofile|uuidd|[a-z][a-z0-9][a-z0-9]adm|ora[a-z][a-z0-9][a-z0-9]|sapadm|oracle)$"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_rhel
2+
# reboot = false
3+
# strategy = configure
4+
# complexity = low
5+
# disruption = low
6+
7+
{{{ ansible_set_config_file_dir(msg, "/etc/rsyslog.conf", "/etc/rsyslog.d", "/etc/rsyslog.conf",
8+
"$ActionSendStreamDriverAuthMode", separator=' ', separator_regex='\s',
9+
value="x509/name", create='yes') }}}

0 commit comments

Comments
 (0)