Skip to content

Disable SHA1 for RPM in RHEL 9 CIS#14316

Merged
Mab879 merged 1 commit intoComplianceAsCode:masterfrom
jan-cerny:rpm_sha1
Jan 21, 2026
Merged

Disable SHA1 for RPM in RHEL 9 CIS#14316
Mab879 merged 1 commit intoComplianceAsCode:masterfrom
jan-cerny:rpm_sha1

Conversation

@jan-cerny
Copy link
Copy Markdown
Collaborator

@jan-cerny jan-cerny commented Jan 21, 2026

The DEFAULT crypto policy on RHEL 9.7 adds SHA1 to hash@rpm policy, which we can see in /etc/crypto-policies/state/CURRENT.pol. Using SHA1 isn't compliant with CIS requirement 1.6.3 "Ensure system wide crypto policy disables sha1 hash and signature support". In this commit we will introduce a new custom crypto policy submodule that will disable SHA1 in hash@rpm policy.

Resolves: https://issues.redhat.com/browse/RHEL-138448

Review hints

Harden a RHEL 9 system with this profile. Then run

  1. update-crypto-policies --show and verify the output contains NO-RPMSHA1
  2. grep SHA1 /etc/crypto-policies/state/CURRENT.pol

The DEFAULT crypto policy on RHEL 9.7 adds SHA1 to `hash@rpm` policy,
which we can see in `/etc/crypto-policies/state/CURRENT.pol`. Using SHA1
isn't compliant with CIS requirement 1.6.3 "Ensure system wide crypto
policy disables sha1 hash and signature support". In this commit we will
introduce a new custom crypto policy submodule that will disable SHA1 in
`hash@rpm` policy.

Resolves: https://issues.redhat.com/browse/RHEL-138448
@jan-cerny jan-cerny added this to the 0.1.80 milestone Jan 21, 2026
@jan-cerny jan-cerny added bugfix Fixes to reported bugs. RHEL9 Red Hat Enterprise Linux 9 product related. CIS CIS Benchmark related. labels Jan 21, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Jan 21, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jan 21, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link
Copy Markdown

ATEX Test Results

Test artifacts have been submitted to Testing Farm.

Results: View Test Results
Workflow Run: View Workflow Details

This comment was automatically generated by the ATEX workflow.

@jan-cerny jan-cerny marked this pull request as ready for review January 21, 2026 10:16
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Jan 21, 2026
@Mab879 Mab879 self-assigned this Jan 21, 2026
@Mab879 Mab879 merged commit 12be006 into ComplianceAsCode:master Jan 21, 2026
142 of 144 checks passed
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Mar 5, 2026
We have discovered that after hardening a RHEL 9 system with CIS profile
people can't install any RPM packages using dnf. Originally, we thought
that the problem was caused by the recent PR
ComplianceAsCode#14316 but it isn't
caused by that because the problem is reproducible also with the latest
released version 0.1.79.  The actual reason is that the profile requires
GPG checks everywhere but the GPG key isn't installed because the CIS
profile doesn't contain rule `ensure_redhat_gpgkey_installed` that would
install the GPG key. The rule is listed in the CIS RHEL9 control file
but the requirement is manual. This is a bad user experience. In CIS
Benchmark, the requirement is manual, because of GPG keys for 3rd party
repositories.  But, add the rule `ensure_redhat_gpgkey_installed` to the
profile because the requirement 1.2.1.2 adds
`ensure_gpgcheck_never_disabled` which requires GPG key checking. If the
Red Hat GPG key wouldn't be installed, people won't be able to install
any RPM package using dnf.  Therefore, we will add the rule
`ensure_redhat_gpgkey_installed` to RHEL 9 CIS.
@ggbecker ggbecker added the Highlight This PR/Issue should make it to the featured changelog. label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes to reported bugs. CIS CIS Benchmark related. Highlight This PR/Issue should make it to the featured changelog. RHEL9 Red Hat Enterprise Linux 9 product related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants