- Notifications
You must be signed in to change notification settings - Fork756
Add rules for custom crypto policy sub modules#14050
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
jan-cerny wants to merge8 commits intoComplianceAsCode:masterChoose a base branch fromjan-cerny:RHEL-111896
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
+294 −36
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Skipping CI for Draft Pull Request. |
Adds a new rule crypto_sub_policy_sshd_ciphers that configure a customcrypto sub policy module for SSHD. The new rule is very similar tofips_custom_stig_sub_policy. It configures a new module for systemwide crypto policies that reduces the set of usable ciphers in sshd.This change aligns the RHEL 8 CIS profiles with theCIS RHEL 8 Benchmark v 4.0.0 requirement 5.1.8.Resolves:https://issues.redhat.com/browse/RHEL-111896
We prevent future code duplication by extracting the common ruledescription and OCIL text to new Jinja macros describe_crypto_sub_policyand ocil_crypto_sub_policy. These macros can be used in rules thatuse the crypto_sub_policy template.
The rule crypto_sub_policy_sshd_macs implements the approachfor configuring strong MACs as requested in CIS Benchmark forRHEL 8 version 4.0.0.
The rule crypto_sub_policy_sshd_cbc implements the approachfor disabling CBC ciphers using a custom crypto policy submodule as requested in requirement 1.6.4 in CIS Benchmarkfor RHEL 8 version 4.0.0.
The rule crypto_sub_policy_weak_macs implements the approachfor disabling MACs using a custom crypto policy submodule as requested in requirement 1.6.3 in CIS Benchmarkfor RHEL 8 version 4.0.0.
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull requestOct 30, 2025
Add a new rule `crypto_sub_policies_cis_rhel8` that configures multiplecustom crypto sub policy modules for RHEL 8 CIS. The new rule is verysimilar to `fips_custom_stig_sub_policy`. It configures new modules forsystem wide crypto policies that reduces the set of usable ciphers insshd, MACs, and others.The rule is templated by a new template `crypto_sub_policies` that isalso introduced in this commit so that the code can be reused in othersimilar rules.This change aligns the RHEL 8 CIS profiles in CaC with the CIS RHEL 8Benchmark v4.0.0 requirements. All crypto requirements of this profileare now covered by this single rule. The reason for merging all of thesub module configuration is to prevent overriding crypto policysettings. If there would be multiple rules, each of them would callthe `update-crypto-policies` commands with a different sub policy,overriding each other.This supersedesComplianceAsCode#14050Resolves:https://issues.redhat.com/browse/RHEL-111896
This PR has been superseded by#14066 |
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull requestOct 31, 2025
Add a new rule `crypto_sub_policies_cis_rhel8` that configures multiplecustom crypto sub policy modules for RHEL 8 CIS. The new rule is verysimilar to `fips_custom_stig_sub_policy`. It configures new modules forsystem wide crypto policies that reduces the set of usable ciphers insshd, MACs, and others.The rule is templated by a new template `crypto_sub_policies` that isalso introduced in this commit so that the code can be reused in othersimilar rules.This change aligns the RHEL 8 CIS profiles in CaC with the CIS RHEL 8Benchmark v4.0.0 requirements. All crypto requirements of this profileare now covered by this single rule. The reason for merging all of thesub module configuration is to prevent overriding crypto policysettings. If there would be multiple rules, each of them would callthe `update-crypto-policies` commands with a different sub policy,overriding each other.This supersedesComplianceAsCode#14050Resolves:https://issues.redhat.com/browse/RHEL-111896
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull requestNov 3, 2025
Add a new rule `crypto_sub_policies_cis_rhel8` that configures multiplecustom crypto sub policy modules for RHEL 8 CIS. The new rule is verysimilar to `fips_custom_stig_sub_policy`. It configures new modules forsystem wide crypto policies that reduces the set of usable ciphers insshd, MACs, and others.The rule is templated by a new template `crypto_sub_policies` that isalso introduced in this commit so that the code can be reused in othersimilar rules.This change aligns the RHEL 8 CIS profiles in CaC with the CIS RHEL 8Benchmark v4.0.0 requirements. All crypto requirements of this profileare now covered by this single rule. The reason for merging all of thesub module configuration is to prevent overriding crypto policysettings. If there would be multiple rules, each of them would callthe `update-crypto-policies` commands with a different sub policy,overriding each other.This supersedesComplianceAsCode#14050Resolves:https://issues.redhat.com/browse/RHEL-111896
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull requestNov 5, 2025
Add a new rule `crypto_sub_policies_cis_rhel8` that configures multiplecustom crypto sub policy modules for RHEL 8 CIS. The new rule is verysimilar to `fips_custom_stig_sub_policy`. It configures new modules forsystem wide crypto policies that reduces the set of usable ciphers insshd, MACs, and others.The rule is templated by a new template `crypto_sub_policies` that isalso introduced in this commit so that the code can be reused in othersimilar rules.This change aligns the RHEL 8 CIS profiles in CaC with the CIS RHEL 8Benchmark v4.0.0 requirements. All crypto requirements of this profileare now covered by this single rule. The reason for merging all of thesub module configuration is to prevent overriding crypto policysettings. If there would be multiple rules, each of them would callthe `update-crypto-policies` commands with a different sub policy,overriding each other.This supersedesComplianceAsCode#14050Resolves:https://issues.redhat.com/browse/RHEL-111896
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
bugfixFixes to reported bugs. CISCIS Benchmark related. do-not-merge/work-in-progressUsed by openshift-ci bot. RHEL8Red Hat Enterprise Linux 8 product related.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR adds new rules to RHEL 8 CIS profiles:
These rules are templated by a template that is also introduced in this PR.
All rules configure or check a new sub module for system wide crypto policy.
Rationale:
Resolves:https://issues.redhat.com/browse/RHEL-111896
Fixes TODOs and aligns the rules with RHEL 8 CIS Benchmark version 4.0.0.
Review Hints: