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

Oct24_ devel to main #420

Merged
merged 87 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
f473459
initial v3.0.0
uk-bolly Mar 11, 2024
b1aa190
updated
uk-bolly Mar 11, 2024
70e7479
removed old conflict line
uk-bolly Mar 11, 2024
a0bba55
tidy up warning on 432
uk-bolly Mar 11, 2024
895ea43
tidy up ec2_checks
uk-bolly Mar 11, 2024
670a0b0
updated warning on line 435
uk-bolly Mar 11, 2024
3f171be
Merge pull request #351 from ansible-lockdown/v3.0.0_initial
uk-bolly Mar 12, 2024
a141978
updated prelim and typos
uk-bolly Mar 12, 2024
6d850c5
Merge pull request #352 from ansible-lockdown/auditd_update
uk-bolly Mar 12, 2024
d587aee
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 18, 2024
680c47e
Merge pull request #355 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Mar 20, 2024
319a091
March 24 updates (#356)
uk-bolly Mar 20, 2024
4d0daba
Allow for a local site policy for the openSSH server. (#358)
bbaassssiiee Mar 21, 2024
59dcd8f
Issues March24 (#366)
uk-bolly Mar 27, 2024
197aa4a
[pre-commit.ci] pre-commit autoupdate (#367)
pre-commit-ci[bot] Apr 10, 2024
1de4490
[pre-commit.ci] pre-commit autoupdate (#368)
pre-commit-ci[bot] Apr 22, 2024
7509256
updated for audit and url alignment (#370)
uk-bolly Apr 25, 2024
3c0ac3e
[pre-commit.ci] pre-commit autoupdate (#372)
pre-commit-ci[bot] Jun 12, 2024
cd73c35
use RHEL8 chrony.conf (#371)
tomkuba Jun 12, 2024
0f4f7b3
Update Alma 8 GPG Key (#369)
ajython Jun 14, 2024
436f3e4
May 24 updates (#376)
uk-bolly Jun 17, 2024
069fc40
[pre-commit.ci] pre-commit autoupdate (#383)
pre-commit-ci[bot] Jun 18, 2024
08f6e77
updated known issues thanks to @fgierlinger
uk-bolly Jun 18, 2024
fec5ad3
Merge pull request #384 from ansible-lockdown/June24_updates
frederickw082922 Jun 18, 2024
a4d11fa
Interactive users logic and workflow (#385)
uk-bolly Jun 19, 2024
6b2456a
updated pre-commit
uk-bolly Jun 24, 2024
318d4bd
issue #387 thanks to @csabapatyi
uk-bolly Jun 24, 2024
4987279
updated workflow titles
uk-bolly Jun 24, 2024
6396881
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 24, 2024
0c943db
Merge pull request #388 from ansible-lockdown/issue_387
uk-bolly Jun 26, 2024
e1ddd8a
Merge pull request #389 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Jun 26, 2024
c48a13f
updated inline with #390 thanks to @txdavec
uk-bolly Jun 26, 2024
bc59fae
Merge pull request #391 from ansible-lockdown/issue_390
uk-bolly Jun 26, 2024
3c0aa76
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 1, 2024
1b4cfd9
Fix idempotency of rule 1.6.1; Modify behavior of changed_when if reb…
ShawnHardwick Jul 3, 2024
586cc63
Merge pull request #393 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Jul 8, 2024
6078eca
Merge pull request #394 from ShawnHardwick/shawn.hardwick/1.6.1_idemp…
uk-bolly Jul 12, 2024
c3f52d1
tidy up remove jmespath req
uk-bolly Jul 12, 2024
4a2f0f4
update to audit summary jmespath req removed
uk-bolly Jul 12, 2024
a54c85c
updated layout
uk-bolly Jul 12, 2024
2427143
Merge pull request #395 from ansible-lockdown/jmespath_audit
uk-bolly Jul 12, 2024
db542ef
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 15, 2024
6c0a8e5
Merge pull request #396 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Jul 17, 2024
77bfb92
fixed typo for issue 397 thanks to @dirkvdplas
uk-bolly Jul 19, 2024
81eba78
4.4.2.5 typo fixed
uk-bolly Jul 19, 2024
e3bea9e
Merge pull request #399 from ansible-lockdown/issue_397
uk-bolly Aug 12, 2024
4a70e6f
addressed #400 thanks to @dirkvdplas
uk-bolly Aug 12, 2024
9bf7999
Updated authselect section 4.4.2.x new vars #402
uk-bolly Aug 12, 2024
48f959e
fix typo
uk-bolly Aug 12, 2024
da0163e
Added space
uk-bolly Aug 12, 2024
44be328
updated to enable arm64 support
uk-bolly Aug 13, 2024
74e869c
updated
uk-bolly Aug 13, 2024
9e007d3
changed maxseq to maxsequence to correct the syntax
dderemiah Aug 13, 2024
728a39e
Merge pull request #404 from dderemiah/typo_4.4.3.2.5
uk-bolly Aug 20, 2024
894c3c3
Merge branch 'main' into august_issues
uk-bolly Aug 21, 2024
f0db4e5
removed pamd for lineinfile
uk-bolly Aug 22, 2024
78bb5a7
Merge branch 'devel' into august_issues
uk-bolly Aug 22, 2024
2101676
updated
uk-bolly Aug 22, 2024
b46d99c
Merge branch 'august_issues' of github.com:ansible-lockdown/RHEL8-CIS…
uk-bolly Aug 22, 2024
ad05f46
fix typo in control
uk-bolly Aug 22, 2024
20ddcb3
fixed error for remember value
uk-bolly Aug 22, 2024
0e86c34
updated to acceoted values
uk-bolly Aug 22, 2024
938013c
fix typo
uk-bolly Aug 22, 2024
e6cc91f
Merge pull request #406 from ansible-lockdown/august_issues
uk-bolly Sep 3, 2024
9a9cdb6
Thanks to @draygoX #407
uk-bolly Sep 13, 2024
f9d58c7
fix typo
uk-bolly Sep 16, 2024
9b76c39
Updated logixc for uid zero 6.2.9
uk-bolly Sep 16, 2024
d12a8ff
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 16, 2024
79ace0c
Merge pull request #409 from ansible-lockdown/pipeline_#407_#408
uk-bolly Sep 17, 2024
9f624a5
Merge pull request #410 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Sep 19, 2024
6ac85ba
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 23, 2024
60d1e23
Merge pull request #411 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Sep 24, 2024
f3ebef8
updated rule 5.1.4
uk-bolly Sep 25, 2024
82af443
Added quotes to file mode
uk-bolly Sep 25, 2024
13240cd
updated register naming
uk-bolly Sep 25, 2024
4028a2d
tidy up of variable naming
uk-bolly Sep 25, 2024
082eb26
Updated pipeline
uk-bolly Sep 25, 2024
ce3decb
removed quotes from boolean
uk-bolly Sep 25, 2024
4a86ad3
Merge pull request #412 from ansible-lockdown/sept24_updates
uk-bolly Sep 25, 2024
a30eba8
removed group from control not required
uk-bolly Oct 7, 2024
4164197
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 7, 2024
284fb45
Merge pull request #413 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Oct 8, 2024
2415575
Merge pull request #416 from ansible-lockdown/6_2_10_update
uk-bolly Oct 8, 2024
5b362c5
fix typo in 2.2.17
enx-roy-scheepers Oct 11, 2024
9d9793b
Merge pull request #419 from enx-roy-scheepers/devel
uk-bolly Oct 14, 2024
d3de112
updated 5.3.3 inline wth documentation
uk-bolly Oct 16, 2024
a0ca2cf
Merge pull request #421 from ansible-lockdown/5_3_3_update
uk-bolly Oct 17, 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
119 changes: 0 additions & 119 deletions .config/.secrets.baseline

This file was deleted.

16 changes: 8 additions & 8 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 @@ -55,7 +55,7 @@

steps:

- name: Git clone the lockdown repository to test
- name: Git Clone the Lockdown Repository to test
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -81,7 +81,7 @@

# Uses dedicated restricted role and policy to enable this only for this task
# No credentials are part of github for AWS auth
- name: configure aws credentials
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@main
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
Expand All @@ -104,23 +104,23 @@
PRIVSUBNET_ID: ${{ secrets.AWS_PRIVSUBNET_ID }}
VPC_ID: ${{ secrets.AWS_VPC_SECGRP_ID }}

- name: Tofu init
- name: Tofu Init
id: init
run: tofu init
env:
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Tofu validate
- name: Tofu Validate
id: validate
run: tofu validate
env:
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Tofu apply
- name: Tofu Apply
id: apply
env:
OSVAR: ${{ vars.OSVAR }}
Expand All @@ -136,11 +136,11 @@

# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep to allow system to come up
- name: Sleep - Allow system to come up
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the Ansible playbook
- name: Run_Ansible_Playbook
- name: Run Ansible Playbook
env:
ANSIBLE_HOST_KEY_CHECKING: "false"
ANSIBLE_DEPRECATION_WARNINGS: "false"
Expand Down
26 changes: 7 additions & 19 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 All @@ -53,7 +41,7 @@

steps:

- name: Git clone the lockdown repository to test
- name: Git Clone the Lockdown Repository to test
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -78,7 +66,7 @@

# Uses dedicated restricted role and policy to enable this only for this task
# No credentials are part of github for AWS auth
- name: configure aws credentials
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@main
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
Expand All @@ -101,23 +89,23 @@
PRIVSUBNET_ID: ${{ secrets.AWS_PRIVSUBNET_ID }}
VPC_ID: ${{ secrets.AWS_VPC_SECGRP_ID }}

- name: Tofu init
- name: Tofu Init
id: init
run: tofu init
env:
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Tofu validate
- name: Tofu Validate
id: validate
run: tofu validate
env:
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Tofu apply
- name: Tofu Apply
id: apply
env:
OSVAR: ${{ vars.OSVAR }}
Expand All @@ -133,11 +121,11 @@

# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep to allow system to come up
- name: Sleep - Allow system to come up
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the Ansible playbook
- name: Run_Ansible_Playbook
- name: Run Ansible Playbook
env:
ANSIBLE_HOST_KEY_CHECKING: "false"
ANSIBLE_DEPRECATION_WARNINGS: "false"
Expand Down
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

repos:
- repo: https:/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
# Safety
- id: detect-aws-credentials
Expand All @@ -33,18 +33,14 @@ repos:
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.config/.secrets.baseline']
exclude: package.lock.json

- repo: https:/gitleaks/gitleaks
rev: v8.18.4
rev: v8.20.1
hooks:
- id: gitleaks
args: ['--baseline-path', '.config/.gitleaks-report.json']
exclude: .config/.secrets.baseline

- repo: https:/ansible-community/ansible-lint
rev: v24.6.0
rev: v24.9.2
hooks:
- id: ansible-lint
name: Ansible-lint
Expand Down
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changes to rhel8CIS

## Benchmark v3.0.0

### 2.1 updates August 2024

new workflow
audit updates
authselect rewrite
thanks to @msachikanta, @fgierlinger, @bantify, @txdavec, @csabapatyi @dirkvdplas, @karlg100 and @devallan for issues and fixes
now able to run audit on ARM64 although not officially supported by CIS feedback needed
audit binary update to 0.4.8

## 2.0 based on CIS 3.0.0

### This is not an upgrade for CIS v2.0.0 due to the number of changes treat as a new baseline
Expand Down
36 changes: 26 additions & 10 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ benchmark_version: v3.0.0
# Whether to skip the reboot
skip_reboot: true

# Modify behavior of changed_when if reboot is pending and skipped to allow idempotency to succeed
reboot_warning_changed_when: true

###
### Settings for associated Audit role using Goss
###
Expand Down Expand Up @@ -560,7 +563,7 @@ rhel8cis_ntp_server_options: "iburst"
# mask - if a dependancy for product so cannot be removed
# Server Services
rhel8cis_autofs_services: false
rhel8cis_autofs_mask: true
rhel8cis_autofs_mask: false
rhel8cis_avahi_server: false
rhel8cis_avahi_mask: false
rhel8cis_dhcp_server: false
Expand Down Expand Up @@ -683,21 +686,34 @@ rhel8cis_sudolog_location: "/var/log/sudo.log"
rhel8cis_sudo_timestamp_timeout: 15

## PAM
# 4.4.2.x
## 4.4.2.x PAM and Authselect
# Do not use authselect if:
# Your host is part of Linux Identity Management.
# Joining your host to an IdM domain with the ipa-client-install command automatically configures SSSD authentication on your host.
# Your host is part of Active Directory via SSSD.
# Calling the realm join command to join your host to an Active Directory domain automatically configures SSSD authentication on your host.
rhel8cis_allow_authselect_updates: false
rhel8cis_allow_authselect_updates: true
##
rhel8cis_authselect_pkg_update: false # NOTE the risks if system is using SSSD or using ipa-client-install
rhel8cis_authselect_custom_profile_create: false
rhel8cis_authselect_custom_profile_select: false
rhel8cis_authselect:
custom_profile_name: 'cis_example_profile'
default_file_to_copy: "sssd --symlink-meta"
options: with-sudo with-faillock without-nullok with-pwhistory

## PAM AND Authselect

# To create a new profile (best for greenfield fresh sites not configured)
# This allows creation of a custom profile using an existing one to build from
# will only create if profiel does not already exist
## options true or false
rhel8cis_authselect_custom_profile_create: true
## Controls:
# - 4.4.2.1 - Ensure custom authselect profile is used
# Settings in place now will fail, they are placeholders from the control example. Due to the way many multiple
# options and ways to configure this control needs to be enabled and settings adjusted to minimise risk.

# This variable configures the name of the custom profile to be created and selected.
# To be changed from default - cis_example_profile
rhel8cis_authselect_custom_profile_name: cis_example_profile
# Name of the existing authselect profile to copy - options can be found with
# ```authselect list``` on the host to be configured
rhel8cis_authselect_default_profile_to_copy: "sssd --symlink-meta"

rhel8cis_pam_faillock:
attempts: 5
Expand Down Expand Up @@ -784,7 +800,7 @@ rhel8cis_auditd:
disk_full_action: halt
action_mail_acct: root
space_left_action: email
admin_space_left_action: email
admin_space_left_action: single
max_log_file_action: keep_logs

# This can be used to configure other keys in auditd.conf
Expand Down
2 changes: 1 addition & 1 deletion tasks/LE_audit_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
audit_pkg_arch_name: AMD64

- name: Pre Audit Setup | Set audit package name | ARM64
when: ansible_facts.machine == "arm64"
when: ansible_facts.machine == "aarch64"
ansible.builtin.set_fact:
audit_pkg_arch_name: ARM64

Expand Down
Loading