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

[Ubuntu2404] Template sysctl improvement #13014

Conversation

alanmcanonical
Copy link
Contributor

Description:

  • Check & remediate /etc/ufw/sysctl.conf in template sysctl

Rationale:

  • Backport [Ubuntu2404] Template sysctl improvement  #12970
  • Fix the Ubuntu2404 cis rule 3.3.9 Ensure suspicious packets are logged
  • The configuration file /etc/ufw/sysctl.conf will override the overlapped and active kernel parameter. We need to check this file and comment out any occurrence of sysctlvar
  • The existing {oval,bash,sce-bash} use the sysctlvar as part of their regex. The sysctlvar is organised using "." which can also represent the kernel format in /etcufw/sysctl.conf e.g. net.ipv4.conf.default.log_martians can capture literal string "net.ipv4.conf.default.log_martians" and also "net/ipv4/conf/default/log_martians" in /etc/ufw/sysctl.conf

@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Feb 10, 2025
Copy link

openshift-ci bot commented Feb 10, 2025

Hi @alanmcanonical. 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.

@@ -4,7 +4,11 @@
{{% endif %}}

# Clean sysctl config directories
{{% if "ubuntu" in product %}}
rm -rf /usr/lib/sysctl.d/* /run/sysctl.d/* /etc/sysctl.d/* /etc/ufw/sysctl.conf
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it'd a good idea to have this either as a product property or as a template parameter. At this point it all looks like littering in the template.

Copy link
Member

Choose a reason for hiding this comment

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

This is a note for the change in master, not for back-porting PR.

@vojtapolasek vojtapolasek self-assigned this Feb 11, 2025
@vojtapolasek
Copy link
Collaborator

Hello @alanmcanonical and thank you for this PR.
I understand that you would like to get improvements to Ubuntu content into the 0.1.76 release. I would like to note that the release is planned to happen on Friday.
I can see that the PR is relatively big and also that it changes a template, therefore potentially affecting all products using the template. Since it is sysctl template, it is used very often.
Due to the fact that the release is going to happen very soon and there is not enough time to perform extensive testing and eventually additional fixes and due to the potential impact of the change, I do not approve this PR.
Moreover, @comps have discovered that the original PR actually brought a problem into the master branch, see here: https://github.com/ComplianceAsCode/content/pull/12970/files#diff-d03c870b4a726e55138684902453e5861732f07040f1406f536b42e3199fb0a2R13
The problem is not directly in the content, but it would prevent correct testing of the content.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants