Skip to content

Update RHEL10 CIS configuration#2452

Open
priteau wants to merge 7 commits into
stackhpc/2025.1from
rhel10-cis-updates
Open

Update RHEL10 CIS configuration#2452
priteau wants to merge 7 commits into
stackhpc/2025.1from
rhel10-cis-updates

Conversation

@priteau

@priteau priteau commented Jul 23, 2026

Copy link
Copy Markdown
Member

Various fixes to our RHEL10 CIS configuration, see release note for details.

priteau added 7 commits July 23, 2026 18:30
When connecting via SSH to a CIS-hardened host, the following message is
displayed:

    Authorized users only. All activity may be monitored and reported.
    Authorized users only. All activity may be monitored and reported.

SSH is configured by ansible-lockdown with `Banner /etc/issue.net`,
which will print the content of /etc/issue.net which contains this line.

The authentication flow then goes through the default /etc/pam.d/sshd,
which includes pam_motd.so, printing the content of /etc/motd.

Remove Banner from sshd configuration to avoid duplicating the warning.

A side-effect is that no message is displayed when using non-interactive
sessions, e.g. when running `ssh <host> <command>`.
This is to avoid catastrophic outages if several audit log partitions
were to become full at the same time.
The check was using the rhel9cis_crypto_policy variable even for Rocky
Linux 10 hosts.
This restores compatibility with ed25519 SSH keys.
@priteau priteau self-assigned this Jul 23, 2026
@priteau
priteau requested a review from a team as a code owner July 23, 2026 17:16
@github-actions github-actions Bot added the waiting-review PR is waiting for a review label Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Updates RHEL10 CIS hardening for compatibility and correctness: upgrades the CIS role, fixes FIPS Ed25519 key checks, sets the crypto policy to DEFAULT, prevents duplicate SSH banners, avoids halting on full audit partitions, corrects documentation, and adds release notes.

Walkthrough

Updates RHEL CIS hardening roles and variables, adds RHEL 10 auditd and banner settings, expands FIPS SSH-key validation to RHEL 10, and documents the changes in release notes.

Changes

RHEL CIS hardening

Layer / File(s) Summary
CIS role and hardening configuration
etc/kayobe/ansible/requirements.yml, etc/kayobe/inventory/group_vars/cis-hardening/cis
Bumps the RHEL 9 CIS role to 1.1.0, sets the RHEL 10 crypto policy to DEFAULT, configures auditd disk-full suspension, disables rule 5.1.5, and corrects a RHEL 9 comment.
FIPS validation and release documentation
etc/kayobe/ansible/maintenance/cis.yml, releasenotes/notes/...yaml
Extends supported SSH-key validation to RHEL 9 and RHEL 10 FIPS modes and documents the role, crypto-policy, auditd, SSH, and banner changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ec5cd53a-80cb-4073-a775-eabd4aa13d62

📥 Commits

Reviewing files that changed from the base of the PR and between 170e476 and 947e671.

📒 Files selected for processing (4)
  • etc/kayobe/ansible/maintenance/cis.yml
  • etc/kayobe/ansible/requirements.yml
  • etc/kayobe/inventory/group_vars/cis-hardening/cis
  • releasenotes/notes/rhel10-cis-updates-f884f27770013f91.yaml
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: stackhpc/check
  • GitHub Check: Ansible 2.17 lint with Python 3.10
  • GitHub Check: Ansible 2.18 lint with Python 3.12
🔇 Additional comments (6)
etc/kayobe/ansible/requirements.yml (1)

24-24: LGTM!

etc/kayobe/inventory/group_vars/cis-hardening/cis (3)

72-72: LGTM!


98-100: 🔒 Security & Privacy

Confirm that DEFAULT is acceptable for every RHEL10 host.

Line 100 removes FIPS as the shared RHEL10 default. That restores Ed25519 compatibility, but may violate deployments requiring FIPS; scope this override or document the exception explicitly.


129-130: 🔒 Security & Privacy

Verify that disabling rule 5.1.5 removes existing SSH Banner directives.

This override may only stop the role from managing the rule. Hosts previously hardened with a Banner directive could therefore retain the duplicate banner unless role version 1.1.0 performs cleanup on the false path.

etc/kayobe/ansible/maintenance/cis.yml (1)

15-17: 🔒 Security & Privacy

Use the same OS-major fact as role selection.

The assertion uses os_release, while Lines 55 and 60 select the CIS role with ansible_facts.distribution_major_version. If these values differ—or os_release is undefined—the FIPS Ed25519 check can fail or be skipped. Prefer the Ansible fact here, or verify that both variables are guaranteed to match.

releasenotes/notes/rhel10-cis-updates-f884f27770013f91.yaml (1)

1-22: LGTM!

Comment on lines +91 to +92
# Prevent system from halting if disk is full
rhel10cis_auditd_disk_full_action: suspend

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🔵 Trivial

Monitor the auditability trade-off of suspend.

This prevents a host halt, but audit logging stops while the partition is full. Confirm that monitoring detects this state and that log-space recovery is automatic.

rhel10cis_auditd_space_left_action: syslog

# Prevent system from halting if disk is full
rhel10cis_auditd_disk_full_action: suspend

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not setting it to syslog like we did before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-review PR is waiting for a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants