Skip to content

Commit f9e4ecc

Browse files
uk-bollyfrederickw082922pre-commit-ci[bot]bergbjorchristoffer-appe
authored
CIS Official main release (#60)
* updated examples to rhel10 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Updated for benchmark_1.0.0 release Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Updated for ansible2.19 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * v1.0.0 initial Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix typos Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated for 1.0.0 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated var naming Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix and update audit rules Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix idempotency regex match improvement Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * authselect idempotency improvements Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated audit immutable logic Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * rename files Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * improve authselect Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Improved audit warning logic to handler Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * added that to assert thanks to rhel9 #388 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated 1.4.2 with checkmode false Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Added max-concurrent option Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated to latest version Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * latest updates Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * changed auditd warning location Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updates Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated comments Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * lint Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 1.4.2 removed efi options no longer listed Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 2.1.4 updated services naming for kea Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated auditd rules Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix typo and tidy spacing Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated for 1.0.1 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated benchmark version Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * typo updates Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 6.3.3.8 title update Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated to latest version Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated to latest version Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fixed typo 3.2.1 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fixed typos Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Added badge creation workflows Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 5.1.2 logic update Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * removed non required loop Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * enhanced options Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * removed old variables Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * linting and stds Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix typo for variable Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * network manager for wireless enhanced Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated to latest Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated NOWEAKMAC to NO-SSHWEAKMACS Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated layout Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fixed benchmark version Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * revert benchmark version in error Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * fix typo in 1.6.3 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated pre-commit Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Update changelog, lic year, and 3.1.1 improved logic Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Typo fix for 3.1.1 var Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Typo fix for 3.1.1 var Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Update ansible_vars_goss with rhel10cis_ipv6_disable_method Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * update 5.1.x and 6.2.2.x fixes from Public Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Update changelog and linting Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Linting Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Typo fixes Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> * Updated bootloader_password to bootloader_hash variable and context added Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * disruption is high set to false as default Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * adjusted fs.suid_dumpable to correct conditional 1.5.4 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 6.2.2.1.2 logic improvement Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 6.2.2.1.2 logic Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 5.4.1.1 disruption high added and variable comments Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * 2.3.2 time_syncronization_server vars updated and logic - template comment Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Aligned to correct level Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * linting Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Added comments on workstation and some controls Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated latest changes Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * udpated Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Adopted bootloader hash option thanks to @Thulium-Drake Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated tags Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * added passlib dependency documentation Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Updated to latest layout Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Updated bootloader password logic and enabled old methods without change Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * tidy up of variables and warning for bootloader password Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated naming Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Improved notes and variable build Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * tidied up comments to make it simpler Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Company title updates Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Company name alignment Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * Fixed var naming Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated postfix handler Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/gitleaks/gitleaks: v8.29.1 → v8.30.0](gitleaks/gitleaks@v8.29.1...v8.30.0) - [github.com/ansible-community/ansible-lint: v25.11.0 → v26.1.1](ansible/ansible-lint@v25.11.0...v26.1.1) - [github.com/adrienverge/yamllint.git: v1.37.1 → v1.38.0](https://github.com/adrienverge/yamllint.git/compare/v1.37.1...v1.38.0) * Fix 1.2.1.3 regex typo for repo_gpgcheck replacement Signed-off-by: Björn Berggren <bjorn.berggren@gmail.com> * Fix 5.4.1.2: use password_expire_min for minimum password days Signed-off-by: Björn Berggren <bjorn.berggren@gmail.com> * Fix 5.4.1.3: use rhel10cis_pass_warn_age in chage command Signed-off-by: Björn Berggren <bjorn.berggren@gmail.com> * Fix 5.4.1.5 remediation for empty and zero inactive values Signed-off-by: Björn Berggren <bjorn.berggren@gmail.com> * CIS 1.5.1: add missing '*' before hard core 0 Signed-off-by: Christoffer Appé <christoffer@appe.se> * fix: add missing space in last two kernel module audit rules Signed-off-by: Christoffer Appé <christoffer@appe.se> * updated Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * typo fixes and lint Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * tidy up lint and unused vars Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> * updated var name in 3.1.2 Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> --------- Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com> Signed-off-by: Frederick Witty <frederick.witty@gotyto.com> Signed-off-by: Björn Berggren <bjorn.berggren@gmail.com> Signed-off-by: Christoffer Appé <christoffer@appe.se> Co-authored-by: Fred W. <112580756+frederickw082922@users.noreply.github.com> Co-authored-by: Frederick Witty <frederick.witty@gotyto.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Björn Berggren <bjorn.berggren@gmail.com> Co-authored-by: Christoffer Appé <christoffer@appe.se>
1 parent 3439a8e commit f9e4ecc

146 files changed

Lines changed: 3529 additions & 2721 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/export_badges_private.yml

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

33
name: Export Private Repo Badges
44

5-
# Use different minute offsets with the same hourly pattern:
6-
# Repo Group Suggested Cron Expression Explanation
7-
# Group A 0 */6 * * * Starts at top of hour
8-
# Group B 10 */6 * * * Starts at 10 after
9-
# And So On
105

116
on:
127
push:
138
branches:
149
- latest
15-
schedule:
16-
- cron: '0 */6 * * *'
1710
workflow_dispatch:
1811

1912
jobs:

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ packer_cache
1111
delete*
1212
ignore*
1313
test_inv
14+
qa_report.md
15+
prompt.md
16+
plan.md
17+
history.md
18+
*.pdf
1419
# temp remove doc while this is built up
1520
doc/
1621
# VSCode

Changelog.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changes to RHEL10CIS
22

3+
## 1.0.1 - Based upon CIS official 1.0.1
4+
5+
- Thanks to Eugene@Frequentis for feedback
6+
- Updated bootloader_password to bootloader_hash variable and context added
7+
- disruption is high set back to default false
8+
- fs.suid_dumpable template moved to correct control 1.5.4 from 1.5.3
9+
- 6.2.2.1.2 updated logic as systemd/journald-upload.conf doesn't exist on clean install
10+
- 5.4.1.1 description updated and disruption high added to control
11+
- 2.3.2 - updated rhel10cis_time_synchronization_servers variables and updated template
12+
- README updated to explain workstation controls and variable overrides
13+
- 6.3.4.8 added logic as augenrules not always present on some OS
14+
- fixed typos in levels aligned with benchmark
15+
- 1.3.1.8 tidied up
16+
- thanks to thulium-drake boot password hash Added passlib dependency in readme requirements
17+
- tidy up tags on tasks/main.yml
18+
19+
- Fixes from Public RHEL9CIS PR 425
20+
- 3.1.1
21+
- Added better sysctl logic to disable IPv6
22+
- Added option to disable IPv6 via sysctl (original method) or via the kernel
23+
- 1.1.1.11 - comments in script updated
24+
- 1.4.2 - efi boot options no longer required so removed
25+
- 1.5.9 & 10 - template updated
26+
- 2.1.4 kea services updated
27+
- 5.1.2 - logic update
28+
- 6.3.3.8 - updated auditd rule for NetworkManager and title updated
29+
- 6.3.3.33 & 34 - updated rule logic
30+
31+
## 1.0.0 - Based upon CIS official 1.0.0
32+
33+
- updated to audit config
34+
- max-concurrent option added
35+
- auditd warning added as task
36+
- latest workflows
37+
- Added CCI references
38+
- relabel added to selinux - new variable added
339

440
## 0.1.6 - FInal beta release updates
541

@@ -25,6 +61,7 @@ Thanks to @bykvaadm
2561
- pre-commit update
2662

2763
## 0.1.4
64+
2865
pre-commit updates
2966
6.2.3.3 updated path for journald.conf
3067

@@ -36,20 +73,22 @@ thanks to @chrispipo
3673
#thanks to @polski-g
3774
- gdm logic for graphical desktop
3875

39-
4076
## 0.1.3
77+
4178
Aligned with public RHEL9 fixes
4279
- 5.4.2.5 - Enhancement for none existing directories thanks to @DianaMariaDDM
4380
- 6.3.4.5 - fixed audit file permissions inline thanks to @DianaMariaDDM
4481
- 6.3.3.5 - added missing locations for audit
4582
- Added fix for yescrypt and root password check thanks to miso321
4683

4784
## 0.1.2
85+
4886
Update to audit_only to allow fetching results
4987
resolved false warning for fetch auditq
5088
Improved documentation and variable compilation for crypto policies
5189

5290
## 0.1.1 RHEL10 - updates
91+
5392
Thanks to @polski-g several issues and improvements added
5493
Improved testing for 50-redhat.conf for ssh
5594
5.1.x regexp improvements

README.md

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

33
## Configure a RHEL 10 machine to be [CIS](https://www.cisecurity.org/cis-benchmarks/) compliant
44

5-
### NOTE THIS IS NOT OFFICIAL AS NOT YET RELEASED BY CIS - BASED ON RHEL9
6-
7-
#### Based on [CIS RedHat Enterprise Linux 9 Benchmark v2.0.0](https://www.cisecurity.org/cis-benchmarks/)
5+
### Based on [CIS RedHat Enterprise Linux 10 Benchmark v1.0.1](https://www.cisecurity.org/cis-benchmarks/)
86

97
---
108

@@ -15,7 +13,7 @@
1513
![Forks](https://img.shields.io/github/forks/ansible-lockdown/RHEL10-CIS?style=social)
1614
![Followers](https://img.shields.io/github/followers/ansible-lockdown?style=social)
1715
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/AnsibleLockdown.svg?style=social&label=Follow%20%40AnsibleLockdown)](https://twitter.com/AnsibleLockdown)
18-
![Discord Badge](https://img.shields.io/discord/1025818806838101102210?logo=discord)
16+
![Discord Badge](https://img.shields.io/discord/925818806838919229?logo=discord)
1917

2018
![License](https://img.shields.io/github/license/ansible-lockdown/RHEL10-CIS?label=License)
2119

@@ -58,9 +56,9 @@
5856

5957
## Looking for support? 🤝
6058

61-
[Lockdown Enterprise](https://www.lockdownenterprise.com#GH_AL_RH10-CIS)
59+
[Lockdown Enterprise](https://www.lockdownenterprise.com#GH_AL_RHEL10-CIS)
6260

63-
[Ansible support](https://www.mindpointgroup.com/cybersecurity-products/ansible-counselor#GH_AL_RH10-CIS)
61+
[Ansible support](https://www.mindpointgroup.com/cybersecurity-products/ansible-counselor#GH_AL_RHEL10-CIS)
6462

6563
### Community 💬
6664

@@ -89,13 +87,15 @@ This role **will make changes to the system** which may have unintended conseque
8987
CIS release always contains changes, it is highly recommended to review the new references and available variables. This have changed significantly since ansible-lockdown initial release.
9088
This is now compatible with python3 if it is found to be the default interpreter. This does come with pre-requisites which it configures the system accordingly.
9189

92-
Further details can be seen in the [Changelog](./ChangeLog.md)
90+
**General:**
91+
92+
- Basic knowledge of Ansible, below are some links to the Ansible documentation to help get started if you are unfamiliar with Ansible
9393

9494
---
9595

9696
## Matching a security Level for CIS
9797

98-
It is possible to to only run level 1 or level 2 controls for CIS.
98+
It is possible to only run level 1 or level 2 controls for CIS.
9999
This is managed using tags:
100100

101101
- level1-server
@@ -121,7 +121,7 @@ The control found in defaults main also need to reflect this as this control the
121121

122122
**Technical Dependencies:**
123123

124-
RHEL Family OS 10
124+
RHEL family 10 - Other versions are not supported.
125125

126126
- Access to download or add the goss binary and content to the system if using auditing
127127
(other options are available on how to get the content to the system.)
@@ -177,7 +177,16 @@ default : ok=270 changed=23 unreachable=0 failed=0 s
177177

178178
## Role Variables
179179

180-
This role is designed that the end user should not have to edit the tasks themselves. All customizing should be done via the defaults/main.yml file or with extra vars within the project, job, workflow, etc.
180+
This role is designed that the end user should not have to edit the tasks themselves. All customizing should be done via the overriding options found in defaults/main.yml file by utilsing variable precedence in appropriate locations that is appropriate for yor environment e.g. group_vars, inventory vars, extra_vars
181+
182+
## Workstation
183+
The following controls are not shown as applicable for workstation.
184+
While that can be implemented please set to false if required.
185+
• 1.3.1.8
186+
• 2.1.10
187+
• 2.1.19
188+
• 2.1.20
189+
• 3.1.2
181190

182191
## Tags 🏷️
183192

0 commit comments

Comments
 (0)