Skip to content

Commit

Permalink
Merge pull request #9951 from jan-cerny/use_package_platform
Browse files Browse the repository at this point in the history
Use templated package platform
  • Loading branch information
vojtapolasek authored Jan 6, 2023
2 parents 2166772 + b5ca218 commit 7ed780c
Show file tree
Hide file tree
Showing 116 changed files with 148 additions and 760 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ ocil: |-
The result should contain:
<pre>ssl start_tls</pre>
platform: nss-pam-ldapd
platform: package[nss-pam-ldapd]
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ ocil: |-
<pre>$ grep relayhost /etc/postfix/main.cf</pre>
If properly configured, the output should show only <tt>{{{ xccdf_value("var_postfix_relayhost") }}}</tt>.
platform: postfix
platform: package[postfix]
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ ocil: |-
<pre>$ grep inet_interfaces /etc/postfix/main.cf</pre>
If properly configured, the output should show only <tt>{{{ xccdf_value("var_postfix_inet_interfaces") }}}</tt>.
platform: postfix
platform: package[postfix]
2 changes: 1 addition & 1 deletion linux_os/guide/services/mail/postfix_harden_os/group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ description: |-
operating as a site MTA, whether the mail server runs using Sendmail, Postfix,
or some other software.
platform: postfix
platform: package[postfix]
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ rationale: |-
severity: medium

platforms:
- ntp or chrony
- package[ntp] or package[chrony]

identifiers:
cce@rhcos4: CCE-82684-2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rationale: |-
severity: medium

platform: machine and (chrony or ntp) # The check uses service_... extended definition, which doesnt support offline mode
platform: machine and (package[chrony] or package[ntp]) # The check uses service_... extended definition, which doesn't support offline mode

identifiers:
cce@rhcos4: CCE-82683-4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rationale: |-
severity: medium

platform: chrony
platform: package[chrony]

identifiers:
cce@rhel7: CCE-82878-0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rationale: |-
severity: medium

platform: chrony
platform: package[chrony]

warnings:
- general: This rule doesn't come with a remediation, the time source needs to be added by the adminstrator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rationale: |-
severity: medium

platform: chrony
platform: package[chrony]

identifiers:
cce@rhel7: CCE-83418-4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rationale: |-
severity: medium

platform: ntp
platform: package[ntp]

references:
cis@alinux2: 2.1.1.2
Expand Down
2 changes: 1 addition & 1 deletion linux_os/guide/services/ntp/ntpd_run_as_ntp_user/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rationale: |-
severity: medium

platform: ntp
platform: package[ntp]

references:
cis@alinux2: 2.1.1.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ ocil: |-
In the file, there should be a section similar to the following:
<pre>server <i>ntpserver</i></pre>
platform: ntp
platform: package[ntp]
2 changes: 1 addition & 1 deletion linux_os/guide/services/ntp/service_ntpd_enabled/rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ template:
servicename: ntpd
packagename: ntp

platform: ntp
platform: package[ntp]
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rationale: |-
severity: medium

platform: tftp-server
platform: package[tftp-server]

identifiers:
cce@rhel7: CCE-80214-0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ocil: |-
<pre>$ sudo grep -v "^#" /etc/snmp/snmpd.conf| grep 'rwuser'</pre>
There should be no output.
platform: net-snmp
platform: package[net-snmp]
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ ocil: |-
<pre>$ sudo grep -v "^#" /etc/snmp/snmpd.conf| grep -E 'public|private'</pre>
There should be no output.
platform: net-snmp
platform: package[net-snmp]
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ ocil: |-
<pre>$ sudo grep 'rocommunity\|rwcommunity\|com2sec' /etc/snmp/snmpd.conf | grep -v "^#"</pre>
There should be no output.
platform: net-snmp
platform: package[net-snmp]
2 changes: 1 addition & 1 deletion linux_os/guide/services/sssd/group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ description: |-
{{{ weblink(link="https://docs.oracle.com/en/operating-systems/oracle-linux/9/userauth/userauth-UsingtheSystemSecurityServicesDaemon.html") }}}
{{%- endif %}}
platform: sssd
platform: package[sssd]
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ references:
stigid@ol8: OL08-00-030603
stigid@rhel8: RHEL-08-030603

platform: usbguard
platform: package[usbguard]

ocil_clause: 'AuditBackend is not set to LinuxAudit'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ description: |-
The following sections describe how to configure the GDM login
banner.
platform: gdm
platform: package[gdm]
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must not be configured to bypass password requirements for privilege escalation.'

platform: pam
platform: package[pam]
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ references:
stigid@sle15: SLES-15-020080
stigid@ubuntu2004: UBTU-20-010453

platform: pam
platform: package[pam]

ocil_clause: '"pam_lastlog" is missing from "{{{ pam_lastlog_path }}}" file, or the silent option is present'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ ocil: |-
The output should return the following uncommented:
<pre>session required pam_namespace.so</pre>
platform: pam
platform: package[pam]
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ocil: |-
<tt>{{{ xccdf_value("var_password_pam_remember") }}}</tt>, or is missing the
"use_authtok" keyword, this is a finding.
platform: pam
platform: package[pam]

template:
name: pam_options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must be configured in the password-auth file to prohibit password reuse for a minimum of five generations.'

platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must be configured in the system-auth file to prohibit password reuse for a minimum of five generations.'

platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fixtext: |-
<pre>authselect enable-feature with-pwhistory</pre>
{{% endif %}}
platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ references:
stigid@rhel8: RHEL-08-020010
vmmsrg: SRG-OS-000021-VMM-000050

platform: pam
platform: package[pam]

ocil_clause: |-
the "deny" option is not set to "{{{ xccdf_value("var_accounts_passwords_pam_faillock_deny") }}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fixtext: |-
<pre>even_deny_root</pre>
{{% endif %}}
platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fixtext: |-
add, uncomment or edit the following line:
<pre>dir = {{{ xccdf_value("var_accounts_passwords_pam_faillock_dir") }}}</pre>
platform: pam
platform: package[pam]

srg_requirement: '{{{ full_name }}} must ensure account lockouts persist.'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fixtext: |-
add or uncomment the following line:
<pre>silent</pre>
platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ references:
stigid@rhel8: RHEL-08-020012
vmmsrg: SRG-OS-000021-VMM-000050

platform: pam
platform: package[pam]

ocil_clause: |-
the "fail_interval" option is not set to "{{{ xccdf_value("var_accounts_passwords_pam_faillock_fail_interval") }}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fixtext: |-
add or uncomment the following line:
<pre>silent</pre>
platform: pam
platform: package[pam]

warnings:
- general: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ references:
stigid@rhel8: RHEL-08-020016
vmmsrg: SRG-OS-000329-VMM-001180

platform: pam
platform: package[pam]

ocil_clause: |-
the "unlock_time" option is not set to "{{{ xccdf_value("var_accounts_passwords_pam_faillock_unlock_time") }}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fixtext: |-
<pre>account required pam_tally2.so</pre></li>
</ul>
platform: pam
platform: package[pam]

srg_requirement: |-
{{{ full_name }}} must automatically lock the root account until the root account is released by an administrator when three unsuccessful logon attempts occur during a 15-minute time period.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fixtext: |-
Modify the content of both <tt>/etc/pam.d/common-auth</tt>, like this:
<pre>auth required pam_tally2.so deny={{{ xccdf_value("var_accounts_passwords_pam_tally2_deny") }}} <tt>unlock_time={{{ xccdf_value("var_accounts_passwords_pam_tally2_unlock_time") }}}</tt> </pre>
platform: pam
platform: package[pam]

srg_requirement: |-
{{{ full_name }}} must automatically lock an account until the locked account is released by an administrator.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must enforce password complexity by requiring that at least one numeric character be used.'

platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ocil: |-
/etc/security/pwquality.conf:dictcheck=1</pre>
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ocil: |-
difok = {{{ xccdf_value("var_password_pam_difok") }}}</pre>
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ocil: |-
<pre>$ grep local_users_only /etc/security/pwquality.conf</pre>
The output should return <tt>local_users_only</tt> uncommented.
platform: pam
platform: package[pam]

warnings:
- management: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fixtext: |-
srg_requirement: |-
{{{ full_name }}} must enforce password complexity rules for the root account.
platform: pam
platform: package[pam]

template:
name: "lineinfile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ocil: |-
<pre>$ grep -i enforcing /etc/security/pwquality.conf</pre>
The output should return <tt>enforcing = 1</tt> uncommented.
platform: pam
platform: package[pam]

template:
name: "lineinfile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must enforce password complexity by requiring that at least one lower-case character be used.'

platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ocil: |-
maxclassrepeat = {{{ xccdf_value("var_password_pam_maxclassrepeat") }}}</pre>
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ocil: |-
maxrepeat = {{{ xccdf_value("var_password_pam_maxrepeat") }}}</pre>
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ocil: |-
minclass = {{{ xccdf_value("var_password_pam_minclass") }}}</pre>
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fixtext: |-
srg_requirement: |-
{{{ full_name }}} passwords must be created with a minimum of 15 characters.
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fixtext: |-
srg_requirement: |-
{{{ full_name }}} must enforce password complexity by requiring that at least one special character be used.
platform: pam
platform: package[pam]

template:
name: accounts_password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ fixtext: |-
srg_requirement: '{{{ full_name }}} must ensure the password complexity module is enabled in the password-auth file.'

platform: pam
platform: package[pam]
Loading

0 comments on commit 7ed780c

Please sign in to comment.