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

Stig v3r14 #473

Merged
merged 28 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
88f570b
updated version
uk-bolly Oct 25, 2023
ea14041
quoted version
uk-bolly Oct 25, 2023
c48ab81
updated rule id 020230
uk-bolly Oct 25, 2023
d602fd9
rule ids and inactive variable added
uk-bolly Oct 25, 2023
f480204
updated
uk-bolly Oct 25, 2023
6a7137f
updated the workflow version and galaxy setup
uk-bolly Oct 31, 2023
fb58a03
lint
uk-bolly Nov 2, 2023
ad96dd7
updated precommit files
uk-bolly Nov 2, 2023
9f52057
Merge branch 'jan_24_updates' into stig_v3r13
uk-bolly Jan 26, 2024
82abd51
incorporated Feb_24 fixes
uk-bolly Mar 14, 2024
e277b23
v3r14 ref updated
uk-bolly Mar 14, 2024
09e75c8
v3r14 update
uk-bolly Mar 14, 2024
82d5761
associated rule updated v3r14
uk-bolly Mar 14, 2024
8911cbd
updated meta
uk-bolly Mar 19, 2024
c7ebdb0
audit rewrite and logic improvements
uk-bolly Apr 15, 2024
4edeb2a
added prelim to includes
uk-bolly Apr 15, 2024
509fa41
added prelim to includes quoted
uk-bolly Apr 15, 2024
2b1804d
Merge branch 'devel' into stig_v3r14
uk-bolly Sep 17, 2024
b51cdf4
added solution for gui and X11 for 040730
uk-bolly Sep 17, 2024
f2baee2
updated default var to use discovered value
uk-bolly Sep 17, 2024
b38ce35
Alignment
uk-bolly Sep 17, 2024
cbeab4a
remove jmespath on the way mountspoints are check
uk-bolly Sep 19, 2024
594c50f
removed breaking dupe line
uk-bolly Sep 19, 2024
c6d2e06
Updated goss version and added ARM
uk-bolly Sep 19, 2024
a94da63
updated mount and wireless checks
uk-bolly Sep 19, 2024
272ce78
aligned benchmark git version name
uk-bolly Sep 19, 2024
6304b8d
Merge branch 'devel' into stig_v3r14
uk-bolly Sep 23, 2024
06d5a34
removed empty line
uk-bolly Sep 23, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/devel_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
jobs:
# This will create messages for first time contributers and direct them to the Discord server
welcome:
runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- uses: actions/first-interaction@main
Expand Down Expand Up @@ -70,7 +70,6 @@
echo IAC_BRANCH=main >> $GITHUB_ENV
fi
# Pull in terraform code for linux servers
- name: Clone GitHub IaC plan
uses: actions/checkout@v4
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/main_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@
# A workflow run is made up of one or more jobs
# that can run sequentially or in parallel
jobs:
# This will create messages for first time contributers and direct them to the Discord server
welcome:
runs-on: self-hosted

steps:
- uses: actions/first-interaction@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |-
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the [Discord Server](https://www.lockdownenterprise.com/discord) as well.
# This workflow contains a single job that tests the playbook
playbook-test:
# The type of runner that the job will run on
Expand Down
21 changes: 14 additions & 7 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Changelog

## 3.2 STIG V3R13 25th Oct 2023

- updated workflow to use new methods
- new ami being used as old obsolete
- Updated the audit layout
- New options if using CentOS to update repo files to vaulted.repo
- rhel7stig_add_updated_repo
## 3.2 STIG v3R14 24th Jan 2024

- Audit updated
- moved audit into prelim
- updates to audit logic for copy and archive options

- RHEL-07-020019 - title and ruleid update
- RHEL-07-020022 - ruleid update
- RHEL-07-020210 - ruleid update
- RHEL-07-020220 - ruleid update
- RHEL-07-020100 - ruleid update and bin/false
- RHEL-07-020101 - ruleid update and bin/false
- RHEL-07-040180 - ruleid update and bin/false
- RHEL-07-040190 - ruleid update and bin/false

## 3.1 STIG V3R13 25th Oct 2023

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Configure a RHEL7 based system to be complaint with Disa STIG

This role is based on RHEL 7 DISA STIG: [ Version 3, Rel 13 released on October 23, 2023 ](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_7_V3R13_STIG.zip).
This role is based on RHEL 7 DISA STIG: [ Version 3, Rel 14 released on January 24, 2024 ](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_7_V3R14_STIG.zip).

---

Expand Down
21 changes: 4 additions & 17 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python2_bin: /bin/python2.7
# audit variable found at the base
benchmark: RHEL7-STIG
## metadata for Audit benchmark
benchmark_version: 'v3r13'
benchmark_version: 'v3r14'

# Whether to skip the reboot
rhel7stig_skip_reboot: true
Expand All @@ -23,10 +23,6 @@ rhel7stig_skip_reboot: true
# It will add the new vaulted location where it is possible to get updates and package
rhel7stig_add_updated_repo: false

###
### Settings for associated Audit role using Goss
###

###########################################
### Goss is required on the remote host ###
### vars/auditd.yml for other settings ###
Expand Down Expand Up @@ -77,6 +73,7 @@ audit_log_dir: '/opt'

### Goss Settings ##
####### END ########

#### Detailed settings found at the end of this document ####

# We've defined complexity-high to mean that we cannot automatically remediate
Expand Down Expand Up @@ -375,8 +372,8 @@ rhel_07_040000: true
rhel_07_040530: true
rhel_07_040600: true

# Whether or not to run tasks related to auditing/patching the desktop environment
rhel7stig_gui: false
# Whether or not to run tasks related to auditing/patching the desktop environment - is discovered if using gnome
rhel7stig_gui: "{{ prelim_gnome_present.stat.exists | default(false) }}"

# Whether to configure dconf rules unconditionally (ignoring presence of dconf
# or rhel7stig_gui)
Expand Down Expand Up @@ -692,10 +689,6 @@ update_audit_template: false
# RHEL-07-030300 uncomment and set the value to a remote IP address that can receive audit logs
# rhel7stig_audisp_remote_server: 10.10.10.10

# RHEL-07-030330: set this to 25% of the free space in /var/log/audit (measured in megabytes)
rhel7stig_auditd_space_left: "{{ ( ansible_mounts | json_query(rhel7stig_audit_disk_size_query) | int / 4 / 1024 / 1024 ) | int + 1 }}"
rhel7stig_audit_disk_size_query: "[?mount=='{{ rhel7stig_audit_part }}'].size_total | [0]"

# RHEL-07-030350
rhel7stig_audit_daemon: auditd
rhel7stig_auditd_mail_acct: root
Expand Down Expand Up @@ -749,12 +742,6 @@ rhel7stig_efi_boot_path: '/boot/efi/EFI/'

rhel7stig_passwd_label: "{{ (this_item | default(item)).id }}: {{ (this_item | default(item)).dir }}"

rhel7stig_local_mounts: "{{ ansible_mounts | to_json | from_json | json_query(rhel7stig_local_mounts_query) }}"
rhel7stig_local_mounts_query: "[?starts_with(device, '/dev/')].mount"

rhel7stig_nfs_mounts: "{{ ansible_mounts | to_json | from_json | json_query(rhel7stig_nfs_mounts_query) }}"
rhel7stig_nfs_mounts_query: "[?starts_with(fstype, 'nfs')].mount"

# DNS Servers to configure, you need two to conform to STIG standards
rhel_07_040600_dns_servers:
- 9.9.9.9
Expand Down
4 changes: 2 additions & 2 deletions tasks/fix-cat1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
- name: "HIGH | RHEL-07-040540 | The Red Hat Enterprise Linux operating system must not contain .shosts files."
block:
- name: "HIGH | RHEL-07-040540 | AUDIT | The Red Hat Enterprise Linux operating system must not contain .shosts files."
ansible.builtin.shell: find {{ rhel7stig_local_mounts | join(' ') }} -xdev -name '.shosts'
ansible.builtin.shell: find / -xdev -not -fstype nfs -name '.shosts'
check_mode: false
changed_when: false
register: rhel_07_040540_audit
Expand All @@ -599,7 +599,7 @@
- name: "HIGH | RHEL-07-040550 | The Red Hat Enterprise Linux operating system must not contain shosts.equiv files."
block:
- name: "HIGH | RHEL-07-040550 | AUDIT | The Red Hat Enterprise Linux operating system must not contain shosts.equiv files."
ansible.builtin.shell: find {{ rhel7stig_local_mounts | join(' ') }} -xdev -name 'shosts.equiv'
ansible.builtin.shell: find / -xdev -not -fstype nfs -name 'shosts.equiv'
check_mode: false
changed_when: false
register: rhel_07_040550_audit
Expand Down
Loading