Skip to content

Commit 9981f76

Browse files
authored
Merge pull request #281 from ansible-lockdown/devel
Initial main release of v1r13
2 parents 26e9ed2 + 18e1cdc commit 9981f76

15 files changed

Lines changed: 399 additions & 349 deletions

.github/workflows/devel_pipeline_validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
- name: Sleep for 60 seconds
114114
run: sleep ${{ vars.BUILD_SLEEPTIME }}
115115

116-
# Run the Ansibleplaybook
116+
# Run the Ansible playbook
117117
- name: Run_Ansible_Playbook
118118
uses: arillso/action.playbook@master
119119
with:

.github/workflows/main_pipeline_validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
- name: Sleep for 60 seconds
103103
run: sleep ${{ vars.BUILD_SLEEPTIME }}
104104

105-
# Run the Ansibleplaybook
105+
# Run the Ansible playbook
106106
- name: Run_Ansible_Playbook
107107
uses: arillso/action.playbook@master
108108
with:

Changelog.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changes to RHEL8STIG
22

3+
## 3.2 - STIV V1R13 - 24th Jan 2024
4+
5+
- Audit updated
6+
- moved audit into prelim
7+
- updates to audit logic for copy and archive options
8+
9+
ruleid updated
10+
11+
- 010001
12+
- 020250
13+
- 020290
14+
- 040090
15+
16+
CAT II
17+
18+
- 020035 - updated rule and added handler for logind restart
19+
- 040020 - /bin/false update and ruleid update
20+
- 040080 - /bin/false and ruleid
21+
- 040111 - /bin/false and ruleid
22+
23+
CAT III
24+
25+
- 040021 - /bin/false and ruleid
26+
- 040022 - /bin/false and ruleid
27+
- 040023 - /bin/false and ruleid
28+
- 040024 - /bin/false and ruleid
29+
- 040025 - /bin/false and ruleid
30+
- 040026 - /bin/false and ruleid
31+
332
## 3.1 - STIG V1R12 - 25th Oct 2023
433

534
ruleid updated

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Configure a RHEL8 based system to be complaint with Disa STIG
44

5-
This role is based on RHEL 8 DISA STIG: [Version 1, Rel 12 released on Oct 25, 2023](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_8_V1R12_STIG.zip).
5+
This role is based on RHEL 8 DISA STIG: [Version 1, Rel 13 released on Jan 24, 2024](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_8_V1R13_STIG.zip).
66

77
---
88

@@ -29,7 +29,6 @@ This role is based on RHEL 8 DISA STIG: [Version 1, Rel 12 released on Oct 25, 2
2929

3030
![License](https://img.shields.io/github/license/ansible-lockdown/RHEL8-STIG?label=License)
3131

32-
3332
---
3433

3534
## Looking for support?
@@ -195,4 +194,5 @@ pre-commit run
195194

196195
Massive thanks to the fantastic community and all its members.
197196
This includes a huge thanks and credit to the original authors and maintainers.
197+
198198
Josh Springer, Daniel Shepherd, Bas Meijeri, James Cassell, Mike Renfro, DFed, George Nalen, Mark Bolwell

defaults/main.yml

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
## metadata for Audit benchmark
3-
benchmark_version: 'v1r12'
3+
benchmark_version: 'v1r13'
44

55
## Benchmark name used by audting control role
66
# The audit variable found at the base
@@ -35,7 +35,6 @@ rhel8stig_audit_disruptive: false
3535
rhel8stig_skip_for_travis: false
3636

3737
rhel8stig_workaround_for_disa_benchmark: true
38-
rhel8stig_workaround_for_ssg_benchmark: true
3938

4039
# tweak role to run in a chroot, such as in kickstart %post script
4140
rhel8stig_system_is_chroot: "{{ ansible_is_chroot | default(False) }}"
@@ -56,23 +55,26 @@ rhel8stig_skip_reboot: true
5655
# Defined will change if control requires
5756
change_requires_reboot: false
5857

59-
##########################################
58+
###########################################
6059
### Goss is required on the remote host ###
61-
## Refer to vars/auditd.yml for any other settings ##
60+
### vars/auditd.yml for other settings ###
6261

6362
# Allow audit to setup the requirements including installing git (if option chosen and downloading and adding goss binary to system)
6463
setup_audit: false
6564

6665
# enable audits to run - this runs the audit and get the latest content
6766
run_audit: false
67+
# Run heavy tests - some tests can have more impact on a system enabling these can have greater impact on a system
68+
audit_run_heavy_tests: true
6869

69-
# Only run Audit do not remediate
70+
## Only run Audit do not remediate
7071
audit_only: false
71-
# As part of audit_only
72-
# This will enable files to be copied back to control node
72+
### As part of audit_only ###
73+
# This will enable files to be copied back to control node in audit_only mode
7374
fetch_audit_files: false
74-
# Path to copy the files to will create dir structure
75+
# Path to copy the files to will create dir structure in audit_only mode
7576
audit_capture_files_dir: /some/location to copy to on control node
77+
#############################
7678

7779
# How to retrieve audit binary
7880
# Options are copy or download - detailed settings at the bottom of this file
@@ -85,20 +87,24 @@ get_audit_binary_method: download
8587
audit_bin_copy_location: /some/accessible/path
8688

8789
# how to get audit files onto host options
88-
# options are git/copy/get_url other e.g. if you wish to run from already downloaded conf
90+
# options are git/copy/archive/get_url other e.g. if you wish to run from already downloaded conf
8991
audit_content: git
9092

91-
# archive or copy:
92-
audit_conf_copy: "some path to copy from"
93+
# If using either archive, copy, get_url:
94+
## Note will work with .tar files - zip will require extra configuration
95+
### If using get_url this is expecting github url in tar.gz format e.g.
96+
### https://github.com/ansible-lockdown/UBUNTU22-CIS-Audit/archive/refs/heads/benchmark-v1.0.0.tar.gz
97+
audit_conf_source: "some path or url to copy from"
9398

94-
# get_url:
95-
audit_files_url: "some url maybe s3?"
99+
# Destination for the audit content to be placed on managed node
100+
# note may not need full path e.g. /opt with the directory being the {{ benchmark }}-Audit directory
101+
audit_conf_dest: "/opt"
96102

97-
# Run heavy tests - some tests can have more impact on a system enabling these can have greater impact on a system
98-
audit_run_heavy_tests: true
103+
# Where the audit logs are stored
104+
audit_log_dir: '/opt'
99105

100-
### End Goss enablements ####
101-
#### Detailed settings found at the end of this document ####
106+
### Goss Settings ##
107+
####### END ########
102108

103109
# These variables correspond with the STIG IDs defined in the STIG and allows you to enable/disable specific rules.
104110
# PLEASE NOTE: These work in coordination with the cat1, cat2, cat3 group variables. You must enable an entire group
@@ -501,11 +507,6 @@ rhel8stig_kdump_needed: false
501507
# or rhel8stig_gui)
502508
rhel8stig_always_configure_dconf: false
503509

504-
# Whether or not to run tasks related to smart card authentication enforcement
505-
rhel8stig_smartcard: false
506-
# Configure your smartcard driver
507-
rhel8stig_smartcarddriver: cackey
508-
509510
# Set the file that sysctl should write to
510511
rhel8stig_sysctl_file: /etc/sysctl.d/99_stig_sysctl.conf
511512

@@ -528,6 +529,11 @@ rhel8stig_ipv6_required: true
528529
# When set to anything other than mcafee it will skip this control assuming localized threat prevention management
529530
rhel8stig_av_sftw: mcafee
530531

532+
# RHEL-08-010110 & 010130 & 010760 & 020190 & 020200 & 020231 & 020310 & 020351
533+
# rhel8stig_login_defs_file_perms
534+
# Permissions set on /etc/login.defs
535+
rhel8stig_login_defs_file_perms: 0644
536+
531537
# RHEL-08-010210
532538
# rhel8stig_var_log_messages_perm is the permissions the /var/log/messages file is set to.
533539
# To conform to STIG standards this needs to be 0640 or more restrictive
@@ -559,10 +565,6 @@ rhel8stig_ssh_pub_key_perm: 0644
559565
rhel8stig_ssh_priv_key_perm: 0600
560566

561567
# RHEL-08-010690
562-
# Set standard user paths here
563-
# Also set whether we should automatically remediate paths in user ini files.
564-
# rhel_08_020720_user_path: "PATH=$PATH:$HOME/.local/bin:$HOME/bin"
565-
rhel8stig_standard_user_path: "PATH=$PATH:$HOME/.local/bin:$HOME/bin"
566568
rhel8stig_change_user_path: false
567569

568570
# RHEL-08-010700
@@ -591,6 +593,19 @@ rhel8stig_local_int_home_file_perms: 0750
591593
# To connform to STIG standards this needs to be set to 0740 or less permissive
592594
rhel8stig_local_int_perm: 0740
593595

596+
# RHEL-08-020100 pamd file permissions - /etc/pam.d/(password-auth|system-auth) files
597+
# rhel8stig_pamd_file_perms
598+
# This needs a minimum of 0644 ( more restrictive may cause issues testing will be required)
599+
rhel8stig_pamd_file_perms: 0644
600+
601+
# RHEL-08-020110 - pwquality file permissions
602+
# mode: "{{ rhel8stig_pamd_file_perms }}"
603+
rhel8stig_pwquality_file_perms: 0644
604+
605+
# RHEL-08-0400xx
606+
# blacklist.conf - /etc/modprobe.d/blacklist.conf file permissions
607+
rhel8stig_blacklist_conf_file_perms: 0640
608+
594609
# RHEL-08-020250
595610
# This is a check for a "supported release"
596611
# These are the minimum supported releases.
@@ -707,13 +722,6 @@ rhel8stig_sssd:
707722
maprule: (userCertificate;binary={cert!bin})
708723
domains: "{{ rhel8stig_sssd_domain }}"
709724

710-
# RHEL-08-020070
711-
# Session timeout setting file (TMOUT setting can be set in multiple files)
712-
# Timeout value is in seconds. (60 seconds * 10 = 600)
713-
rhel8stig_shell_session_timeout:
714-
file: /etc/profile.d/tmout.sh
715-
timeout: 600
716-
717725
# RHEL-08-010200 | All network connections associated with SSH traffic must
718726
# terminate at the end of the session or after 10 minutes of inactivity, except
719727
# to fulfill documented and validated mission requirements.
@@ -763,14 +771,6 @@ rhel8stig_pam_faillock:
763771
# RHEL-08-020035
764772
rhel_08_020035_idlesessiontimeout: 900
765773

766-
# RHEL-08-030670
767-
# rhel8stig_audisp_disk_full_action options are syslog, halt, and single to fit STIG standards
768-
rhel8stig_audisp_disk_full_action: single
769-
770-
# RHEL-08-030680
771-
# rhel8stig_audisp_network_failure_action optoins are syslog, halt, and single
772-
rhel8stig_audisp_network_failure_action: single
773-
774774
# RHEL-08-030060
775775
# rhel8stig_auditd_disk_full_action options are SYSLOG, HALT, and SINGLE to fit STIG standards
776776
rhel8stig_auditd_disk_full_action: HALT
@@ -892,7 +892,6 @@ rhel8stig_existing_zone_to_copy: public
892892
# RHEL-08-040090
893893
# This designed not work with rhel8stig_existing_zone_to_copy and when deploy new rules
894894
# rhel8stig_white_list_services is the services that you want to allow through initially for the new firewall zone
895-
# http and ssh need to be enabled for the role to run.
896895
# This can also be a port number if no service exists
897896
rhel8stig_white_list_services:
898897
- ssh
@@ -910,11 +909,6 @@ rhel8stig_ssh_ciphers: "Ciphers=aes256-ctr,aes192-ctr,aes128-ctr,aes256-gcm@open
910909
# Expected Values for FIPS KEX algorithims
911910
rhel8stig_ssh_kex: "KexAlgorithms=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"
912911

913-
# This will be the CRYPTO_POLICY settings in the opensshserver.conf file. It will be a string for the entirety of the setting
914-
# to conform to STIG standard control RHEL-08-010290 this variable must contain oCiphers=aes256-ctr,aes192-ctr,aes128-ctr -oMACS=hmac-sha2-512,hmac-sha2-256 settings
915-
# to conform to STIG standard control RHEL-08-010291 this variable must cotnain oCiphers=aes256-ctr,aes192-ctr,aes128-ctr
916-
rhel8stig_ssh_server_crypto_settings: "-oCiphers=aes256-ctr,aes192-ctr,aes128-ctr -oMACS=hmac-sha2-512,hmac-sha2-256"
917-
918912
# RHEL-08-010295
919913
# This will be teh GnuTLS ecryption packages. The task sets the +VERS-ALL: setting, the only items needed are the DoD approved encryptions
920914
# to conform to STIG standards this variable must contain +VERS-ALL:-VERS-DTLS0.9:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS1.0

handlers/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
when:
1111
- not system_is_container
1212

13+
- name: Restart_systemdlogin
14+
ansible.builtin.systemd:
15+
name: systemd-logind
16+
state: restarted
17+
1318
- name: sysctl system
1419
ansible.builtin.shell: sysctl --system
1520
when: "'procps-ng' in ansible_facts.packages"
@@ -74,7 +79,7 @@
7479
remote_src: true
7580
owner: root
7681
group: root
77-
mode: 0755
82+
mode: '0755'
7883
when:
7984
- rhel8stig_grub2_user_cfg.stat.exists
8085
- rhel8stig_workaround_for_disa_benchmark
@@ -97,7 +102,7 @@
97102
dest: /etc/audit/rules.d/99_auditd.rules
98103
owner: root
99104
group: root
100-
mode: 0600
105+
mode: '0600'
101106
notify: restart auditd
102107

103108
- name: restart auditd

tasks/fix-cat1.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
dest: /etc/default/grub
6464
owner: root
6565
group: root
66-
mode: 0644
66+
mode: '0644'
6767
vars:
6868
grub_cmdline_linux: "{{ rhel_08_010020_grub_cmdline_linux_audit.stdout }}"
6969
when: rhel_08_010020_default_grub_missing_audit is changed # noqa no-handler
@@ -187,7 +187,7 @@
187187
line: "GRUB2_PASSWORD={{ rhel8stig_bootloader_password_hash }}"
188188
owner: root
189189
group: root
190-
mode: 0640
190+
mode: '0640'
191191
notify: confirm grub2 user cfg
192192
when:
193193
- not system_is_ec2
@@ -437,7 +437,7 @@
437437
create: true
438438
owner: root
439439
group: root
440-
mode: 0644
440+
mode: '0644'
441441
with_items:
442442
- { regexp: '^\[org/gnome/settings-daemon/plugins/media-keys\]', line: '[org/gnome/settings-daemon/plugins/media-keys]', insertafter: 'EOF' }
443443
- { regexp: 'logout=', line: "logout=''", insertafter: '\[org/gnome/settings-daemon/plugins/media-keys\]' }

0 commit comments

Comments
 (0)