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

Set package_rng-tools_installed as machine only #10810

Conversation

candrews
Copy link
Contributor

@candrews candrews commented Jul 7, 2023

Description:

Set package_rng-tools_installed as machine only

Rationale:

Entropy gathering should be done on the host, not in each container.

Entropy gathering should be done on the host, not in each container.
@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Jul 7, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 7, 2023

Hi @candrews. 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/test-infra repository.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

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

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_package_rng-tools_installed' differs.
--- xccdf_org.ssgproject.content_rule_package_rng-tools_installed
+++ xccdf_org.ssgproject.content_rule_package_rng-tools_installed
@@ -1,4 +1,10 @@
+# Remediation is applicable only in certain platforms
+if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
 
 if ! rpm -q --quiet "rng-tools" ; then
     yum install -y "rng-tools"
 fi
+
+else
+    >&2 echo 'Remediation is not applicable, nothing was done'
+fi

ansible remediation for rule 'xccdf_org.ssgproject.content_rule_package_rng-tools_installed' differs.
--- xccdf_org.ssgproject.content_rule_package_rng-tools_installed
+++ xccdf_org.ssgproject.content_rule_package_rng-tools_installed
@@ -2,6 +2,7 @@
   package:
     name: rng-tools
     state: present
+  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
   tags:
   - CCE-82968-9
   - DISA-STIG-RHEL-08-010472

Platform has been changed for rule 'xccdf_org.ssgproject.content_rule_package_rng-tools_installed'
--- xccdf_org.ssgproject.content_rule_package_rng-tools_installed
+++ xccdf_org.ssgproject.content_rule_package_rng-tools_installed
@@ -1 +1 @@
-
+oval:ssg-installed_env_is_a_machine:def:1

@codeclimate
Copy link

codeclimate bot commented Jul 7, 2023

Code Climate has analyzed commit 94849de 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 53.5% (0.0% change).

View more on Code Climate.

@marcusburghardt marcusburghardt merged commit 583b2a0 into ComplianceAsCode:master Jul 7, 2023
31 of 33 checks passed
@marcusburghardt marcusburghardt self-assigned this Jul 7, 2023
@marcusburghardt marcusburghardt added CPE-AL CPE Applicability Language Update Rule Issues or pull requests related to Rules updates. labels Jul 7, 2023
@marcusburghardt marcusburghardt added this to the 0.1.69 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CPE-AL CPE Applicability Language needs-ok-to-test Used by openshift-ci bot. Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants