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

Disable remediations for set_iptables_default_rule and set_ip6tables_default_rule on Ubuntu products #13139

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

mpurg
Copy link
Contributor

@mpurg mpurg commented Mar 4, 2025

Description:

  • Disable remediations for set_iptables_default_rule and set_ip6tables_default_rule on Ubuntu products
  • Fix path for iptables config in rule descriptions

Rationale:

  • Remediations are disabled to avoid network lockout
  • New behavior is consistent with analogous nftables and ufw rules nftables_ensure_default_deny_policy and set_ufw_default_rule.

mpurg added 2 commits March 4, 2025 16:40
Disable remediations for set_iptables_default_rule and
set_ip6tables_default_rule on Ubuntu products as it can result in network lockout.

New behavior is consistent with analogous nftables and ufw rules
nftables_ensure_default_deny_policy and set_ufw_default_rule.
Copy link

openshift-ci bot commented Mar 4, 2025

Hi @mpurg. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Mar 4, 2025
@mpurg mpurg changed the title Ubuntu iptables default rule Disable remediations for set_iptables_default_rule and set_ip6tables_default_rule on Ubuntu products Mar 4, 2025
Copy link

github-actions bot commented Mar 4, 2025

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
New content has different text for rule 'xccdf_org.ssgproject.content_rule_set_iptables_default_rule'.
--- xccdf_org.ssgproject.content_rule_set_iptables_default_rule
+++ xccdf_org.ssgproject.content_rule_set_iptables_default_rule
@@ -6,7 +6,9 @@
 To set the default policy to DROP (instead of ACCEPT) for
 the built-in INPUT chain which processes incoming packets,
 add or correct the following line in
+
 /etc/sysconfig/iptables:
+
 :INPUT DROP [0:0]
 
 [reference]:

Copy link

codeclimate bot commented Mar 4, 2025

Code Climate has analyzed commit a6d2564 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 62.1% (0.0% change).

View more on Code Climate.

@mpurg
Copy link
Contributor Author

mpurg commented Mar 4, 2025

Automatus tests are failing due to iptables not working in podman containers.

Ubuntu 24.04 VM:

INFO - xccdf_org.ssgproject.content_rule_set_iptables_default_rule
INFO - Script wrong.fail.sh using profile (all) OK                                                                             
INFO - Script correct.pass.sh using profile (all) OK 

INFO - xccdf_org.ssgproject.content_rule_set_ip6tables_default_rule                                                                                                                                                                                           
INFO - Script wrong.fail.sh using profile (all) OK                                                                                                                                                                                                            
INFO - Script correct.pass.sh using profile (all) OK                                                                                                                                                                                                          
INFO - Script ipv6_disabled.pass.sh using profile (all) OK 

Ubuntu 22.04 VM:

INFO - xccdf_org.ssgproject.content_rule_set_iptables_default_rule
INFO - Script wrong.fail.sh using profile xccdf_org.ssgproject.content_profile_cis_level2_server OK
INFO - Script correct.pass.sh using profile xccdf_org.ssgproject.content_profile_cis_level2_server OK

INFO - xccdf_org.ssgproject.content_rule_set_ip6tables_default_rule
INFO - Script wrong.fail.sh using profile xccdf_org.ssgproject.content_profile_cis_level2_server OK
INFO - Script correct.pass.sh using profile xccdf_org.ssgproject.content_profile_cis_level2_server OK
INFO - Script ipv6_disabled.pass.sh using profile xccdf_org.ssgproject.content_profile_cis_level2_server OK

@dodys dodys self-assigned this Mar 5, 2025
@dodys dodys requested a review from a team March 5, 2025 07:47
@dodys dodys added the Ubuntu Ubuntu product related. label Mar 5, 2025
@dodys dodys added this to the 0.1.77 milestone Mar 5, 2025
Copy link
Contributor

@dodys dodys left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@dodys dodys merged commit 17fd3f1 into ComplianceAsCode:master Mar 5, 2025
97 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Used by openshift-ci bot. Ubuntu Ubuntu product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants