Skip to content

Commit e8063eb

Browse files
authored
Merge pull request #188 from ansible-lockdown/devel
Devel to main release stig v1r9
2 parents 2c784de + 7e6ca37 commit e8063eb

15 files changed

Lines changed: 343 additions & 190 deletions

.github/workflows/OS.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Ami Rocky 85
1+
#Ami Rocky 85 - US_east 1
22
ami_id = "ami-043ceee68871e0bb5"
33
ami_os = "rocky8"
44
ami_username = "rocky"

.github/workflows/linux_benchmark_testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
repo-token: ${{ secrets.GITHUB_TOKEN }}
3232
pr-message: |-
3333
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
34-
Please join in the conversation happening on the [Discord Server](https://discord.gg/JFxpSgPFEJ) as well.
34+
Please join in the conversation happening on the [Discord Server](https://discord.io/ansible-lockdown) as well.
3535
# This workflow contains a single job called "build"
3636
build:
3737
# The type of runner that the job will run on
@@ -44,7 +44,7 @@ jobs:
4444
steps:
4545
# Checks-out your repository under $GITHUB_WORKSPACE,
4646
# so your job can access it
47-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v3
4848
with:
4949
ref: ${{ github.event.pull_request.head.sha }}
5050

.github/workflows/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ resource "local_file" "inventory" {
7676
setup_audit: true
7777
run_audit: true
7878
system_is_ec2: true
79-
audit_git_version: devel
8079
EOF
8180
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
# This is a basic workflow to help you get started with Actions
4+
5+
name: update galaxy
6+
7+
# Controls when the action will run.
8+
# Triggers the workflow on merge request events to the main branch
9+
on:
10+
push:
11+
branches:
12+
- main
13+
jobs:
14+
update_role:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: hspaans/ansible-galaxy-action@master
19+
with:
20+
api_key: ${{ secrets.GALAXY_API_KEY }}

Changelog.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,52 @@
11
# Changes to RHEL8STIG
22

3+
## Relase 2.8.3
4+
5+
- improvements to openssh configs and seperated tasks
6+
7+
## Release 2.8.2
8+
9+
- updates to pamd logic thanks to @JacobBuskirk for highlighting
10+
11+
Also following issues/PRs
12+
13+
- #168
14+
- #169
15+
- #170
16+
- #171
17+
- #172
18+
- #177
19+
- #178
20+
- #179
21+
- #180
22+
- #181
23+
24+
## Release 2.8.0
25+
26+
- updates to workflow
27+
- ami
28+
- update to actions to latest versions
29+
- update_galaxy workflow added
30+
- README alignment
31+
- ansible.cfg added showing how tested
32+
- audit template updated
33+
- moved warnihg statements arounf for reboot
34+
35+
- RULEID reference updated
36+
- 010510 rule no longer required
37+
- 010671 improvement
38+
- 020040 loop added
39+
- 040090 - var typo fixed
40+
- 040342 new control for FIP_KEX Algorithms
41+
- new FIPS_KEX_ALGO variable
42+
343
## Release 2.7.0
44+
445
- lint updates
546
- Benchmark 1.8 Updates
647
- New RULEID for the following, plus additional notes if needed
748
- CAT1
8-
- RHEL-08-010000 
9-
-
49+
- RHEL-08-010000
1050
- CAT2
1151
- RHEL-08-010040
1252
- RHEL-08-010090
@@ -46,7 +86,7 @@
4686
- RHEL-08-020230
4787
- RHEL-08-010280
4888
- RHEL-08-020300
49-
- RHEL-08-020350 - Updated CCI
89+
- RHEL-08-020350 - Updated CCI
5090
- RHEL-08-020352
5191
- RHEL-08-040127 - Added tasks to deal with different versions of RHEL8
5292
- RHEL-08-040161
@@ -73,7 +113,6 @@
73113
- RHEL-08-040286 - Updated to include find adn remove for conflicting parameters
74114
- RHEL-08-040340
75115
- RHEL-08-040341
76-
- RHEL-08-040400 - New control
116+
- RHEL-08-040400 - New control
77117
- CAT3
78118
- RHEL-08-020340 - Updated CCI
79-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Configure a RHEL/Rocky 8 system to be DISA STIG compliant. All findings will be audited by default. Non-disruptive CAT I, CAT II, and CAT III findings will be corrected by default. Disruptive finding remediation can be enabled by setting `rhel8stig_disruption_high` to `yes`.
88

9-
This role is based on RHEL 8 DISA STIG: [Version 1, Rel 8 released on Oct 27, 2022](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_8_V1R8_STIG.zip).
9+
This role is based on RHEL 8 DISA STIG: [Version 1, Rel 9 released on Jan 26, 2023](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_8_V1R9_STIG.zip).
1010

1111
## Join us
1212

ansible.cfg

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[defaults]
2+
host_key_checking=False
3+
display_skipped_hosts=True
4+
system_warnings=False
5+
command_warnings=False
6+
nocows=1
7+
retry_files_save_path=/dev/null
8+
9+
# Use the YAML callback plugin.
10+
stdout_callback = yaml
11+
# Use the stdout_callback when running ad-hoc commands.
12+
bin_ansible_callbacks = True
13+
14+
[privilege_escalation]
15+
16+
[paramiko_connection]
17+
record_host_keys=False
18+
19+
[ssh_connection]
20+
transfer_method=scp
21+
22+
[accelerate]
23+
24+
[selinux]
25+
26+
[colors]
27+
28+
[diff]

defaults/main.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
## metadata for Audit benchmark
3-
benchmark_version: '1.7'
3+
benchmark_version: 'v1r9'
44

55
## Benchmark name used by audting control role
66
# The audit variable found at the base
@@ -178,7 +178,6 @@ rhel_08_010450: true
178178
rhel_08_010480: true
179179
rhel_08_010490: true
180180
rhel_08_010500: true
181-
rhel_08_010510: true
182181
rhel_08_010520: true
183182
rhel_08_010521: true
184183
rhel_08_010522: true
@@ -426,6 +425,7 @@ rhel_08_040321: true
426425
rhel_08_040330: true
427426
rhel_08_040340: true
428427
rhel_08_040341: true
428+
rhel_08_040342: true
429429
rhel_08_040350: true
430430
rhel_08_040370: true
431431
rhel_08_040380: true
@@ -477,6 +477,17 @@ rhel8stig_smartcard: false
477477
# Configure your smartcard driver
478478
rhel8stig_smartcarddriver: cackey
479479

480+
#Whether or not system uses remote automounted home directories via autofs
481+
rhel8stig_autofs_remote_home_dirs: false
482+
483+
#The local mount point used by autofs to mount remote home directory to. This location will be excluded during getent user enumeration, if rhel8stig_autofs_remote_home_dirs is true
484+
rhel8stig_auto_mount_home_dirs_local_mount_point: "/home/"
485+
486+
#The default shell command to gather local interactive user directories
487+
## NOTE: You will need to adjust the UID range in parenthesis below.
488+
## ALSO NOTE: We weed out any user with a home dir not in standard locations because interactive users shouldn't have those paths as a home dir. Add or removed directory paths as needed below.
489+
local_interactive_user_dir_command: "getent passwd { {{ rhel8stig_int_gid }}..65535} | cut -d: -f6 | sort -u | grep -v '/var/' | grep -v '/nonexistent/*' | grep -v '/run/*'"
490+
480491
# IPv6 required
481492
rhel8stig_ipv6_required: true
482493

@@ -554,10 +565,10 @@ rhel8stig_local_int_perm: 0740
554565
# These are the minimum supported releases.
555566
# (Red Hat has support for older versions if you pay extra for it.)
556567
rhel8stig_min_supported_os_ver:
557-
RedHat: "8.4"
558-
CentOS: "8.4"
559-
Rocky: "8.4"
560-
AlmaLinux: "8.4"
568+
RedHat: "8.7"
569+
CentOS: "8.7"
570+
Rocky: "8.7"
571+
AlmaLinux: "8.7"
561572

562573
# RHEL-08-040260
563574
# If system is not router, run tasks that disable router functions.
@@ -601,7 +612,7 @@ rhel8stig_aide_cron:
601612
special_time: daily
602613
# Disable the notification check rule to disable mailing notifications
603614
notify_by_mail: true
604-
notify_cmd: ' | /bin/mail -s "$(hostname) - AIDE Integrity Check" root@localhost'
615+
notify_cmd: ' | /var/spool/mail -s "$(hostname) - Daily aide integrity check run" root@localhost'
605616

606617
rhel8stig_cron_special_disable: "{{
607618
rhel8stig_workaround_for_disa_benchmark or
@@ -855,7 +866,10 @@ rhel8stig_white_list_services:
855866
# This will be the MACs setting. It is a string that will be the entirety of the MAC's setting in the openssh.config file
856867
# to conform to STIG standard control RHEL-08-010290 this variable must include hmac-sha2-512,hmac-sha2-256
857868
# to conform to STIG standard control RHEL-08-010291 this variable must include aes256-ctr,aes192-ctr,aes128-ctr
858-
rhel8stig_ssh_cipher_settings: "aes256-ctr,aes192-ctr,aes128-ctr"
869+
rhel8stig_ssh_macs: 'MACS=hmac-sha2-512,hmac-sha2-256'
870+
rhel8stig_ssh_ciphers: "Ciphers=aes256-ctr,aes192-ctr,aes128-ctr"
871+
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"
872+
859873
# This will be the CRYPTO_POLICY settings in the opensshserver.conf file. It will be a string for the entirety of the setting
860874
# 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
861875
# to conform to STIG standard control RHEL-08-010291 this variable must cotnain oCiphers=aes256-ctr,aes192-ctr,aes128-ctr
@@ -875,6 +889,7 @@ rhel8stig_tmux_lock_after_time: 900
875889
# Value must be greater than 0 to conform to STIG standards
876890
rhel8stig_sudo_timestamp_timeout: 1
877891

892+
878893
#### Goss Configuration Settings ####
879894
# Set correct env for the run_audit.sh script from https://github.com/ansible-lockdown/{{ benchmark }}-Audit.git"
880895
audit_run_script_environment:
@@ -884,14 +899,14 @@ audit_run_script_environment:
884899

885900
### Goss binary settings ###
886901
goss_version:
887-
release: v0.3.16
888-
checksum: 'sha256:827e354b48f93bce933f5efcd1f00dc82569c42a179cf2d384b040d8a80bfbfb'
902+
release: v0.3.21
903+
checksum: 'sha256:9a9200779603acf0353d2c0e85ae46e083596c10838eaf4ee050c924678e4fe3'
889904
audit_bin_path: /usr/local/bin/
890905
audit_bin: "{{ audit_bin_path }}goss"
891906
audit_format: json
892907

893908
# if get_goss_file == download change accordingly
894-
goss_url: "https://github.com/aelsabbahy/goss/releases/download/{{ goss_version.release }}/goss-linux-amd64"
909+
goss_url: "https://github.com/goss-org/goss/releases/download/{{ goss_version.release }}/goss-linux-amd64"
895910

896911
## if get_goss_file - copy the following needs to be updated for your environment
897912
## it is expected that it will be copied from somewhere accessible to the control node
@@ -902,7 +917,7 @@ copy_goss_from_path: /some/accessible/path
902917
## managed by the control audit_content
903918
# git
904919
audit_file_git: "https://github.com/ansible-lockdown/{{ benchmark }}-Audit.git"
905-
audit_git_version: benchmark_v1r8_rh8
920+
audit_git_version: "benchmark_{{ benchmark_version }}_rh8"
906921

907922
# copy:
908923
audit_local_copy: "some path to copy from"

tasks/fix-cat1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
- CAT1
243243
- CCI-001749
244244
- SRG-OS-000366-GPOS-00153
245-
- SV-230264r627750_rule
245+
- SV-230264r880711_rule
246246
- V-230264
247247
- yum
248248

0 commit comments

Comments
 (0)