Skip to content

Conversation

@alanmcanonical
Copy link
Contributor

Description:

  • Define firewall varriable for Ubuntu 2404 STIG

Rationale:

The rule package_ufw_installed use the template package_installed_guard_var but without defining the necessary var

podman test result:

ADDITIONAL_TEST_OPTIONS="--debug --duplicate-templates --remove-fips-certified" tests/test_rule_in_container.sh --no-make-applicable-in-containers --dontclean --logdir logs_bash --remediate-using bash --name ssg_ubuntu2404 --datastream build/ssg-ubuntu2404-ds.xml package_ufw_installed
Setting console output to log level INFO
INFO - The base image option has been specified, choosing Podman-based test environment.
INFO - Logging into logs_bash/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_package_ufw_installed
INFO - Script package-installed.pass.sh using profile (all) OK
INFO - Script package-removed.fail.sh using profile (all) OK
INFO - Script package-installed-removed.fail.sh using profile (all) OK
INFO - Script package-removed-wrong-var.pass.sh using profile (all) OK

The generated fix oscap xccdf generate fix --profile stig --out fix.sh ssg-ubuntu2404-ds.xml :

###############################################################################
# BEGIN fix (79 / 231) for 'xccdf_org.ssgproject.content_rule_package_ufw_installed'
###############################################################################
(>&2 echo "Remediating rule 79/231: 'xccdf_org.ssgproject.content_rule_package_ufw_installed'"); (

var_network_filtering_service='ufw'



  if [[ "ufw" =~ $var_network_filtering_service ]]; then
    DEBIAN_FRONTEND=noninteractive apt-get install -y "ufw"
  fi

) # END fix for 'xccdf_org.ssgproject.content_rule_package_ufw_installed'

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

openshift-ci bot commented Jul 11, 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.

Copy link
Contributor

@mpurg mpurg 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!

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 58980c3 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 61.7% (0.0% change).

View more on Code Climate.

@Mab879 Mab879 added this to the 0.1.78 milestone Jul 11, 2025
@Mab879 Mab879 added the Update Profile Issues or pull requests related to Profiles updates. label Jul 11, 2025
@jan-cerny jan-cerny self-assigned this Jul 15, 2025
@jan-cerny jan-cerny merged commit 6325804 into ComplianceAsCode:master Jul 15, 2025
120 of 123 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. Update Profile Issues or pull requests related to Profiles updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants