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

Adjust bash to correspond to rule.yml for correct value of TimedLoginEnable #9098

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

lenox-joseph
Copy link
Contributor

@lenox-joseph lenox-joseph commented Jul 5, 2022

Description:

Updates 'Disable GDM Guest Login' rule to match its OCIL checklist item.

Rationale:

According to STIG guideline for RHEL7 and the rule.yml for this check, TimedLoginEnable=false is the correct value and other check tools such as Teneble's SecurityCenter feed don't assume a case-insensitive check, and manual checks against the OCIL should match the automated remediation and/or description.

Additionally, the GDM configuration file documentation indicates that the correct configuration value is false

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

openshift-ci bot commented Jul 5, 2022

Hi @lenox-joseph. 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 5, 2022

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

@lenox-joseph
Copy link
Contributor Author

Found this because Tenable's SecurityCenter's STIG feed for RHEL7 doesn't do case-insensitive checks.

@github-actions
Copy link

github-actions bot commented Jul 5, 2022

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_gnome_gdm_disable_guest_login' differs:
--- old datastream
+++ new datastream
@@ -6,9 +6,9 @@
 if ! grep -q "^TimedLoginEnable=" /etc/gdm/custom.conf
 then
 sed -i "/^\[daemon\]/a \
- TimedLoginEnable=False" /etc/gdm/custom.conf
+ TimedLoginEnable=false" /etc/gdm/custom.conf
 else
- sed -i "s/^TimedLoginEnable=.*/TimedLoginEnable=False/g" /etc/gdm/custom.conf
+ sed -i "s/^TimedLoginEnable=.*/TimedLoginEnable=false/g" /etc/gdm/custom.conf
 fi
 fi

@Mab879 Mab879 self-assigned this Jul 5, 2022
@Mab879 Mab879 added this to the 0.1.63 milestone Jul 5, 2022
@Mab879 Mab879 added bugfix Fixes to reported bugs. Bash Bash remediation update. labels Jul 5, 2022
Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I will not add the okay-to-test for OpenShift CI since this is a GDM fix. Once CI passes, I will merge this. Some of the Packet as Service failures are due to issues with the Fedora mirrors, so don't worry about them now.

@codeclimate
Copy link

codeclimate bot commented Jul 5, 2022

Code Climate has analyzed commit 3959fc9 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 42.7% (0.0% change).

View more on Code Climate.

@Mab879
Copy link
Member

Mab879 commented Jul 5, 2022

Waving tests for CS9 as it seems they having some infra issues at the moment.

@Mab879 Mab879 merged commit dc59f39 into ComplianceAsCode:master Jul 5, 2022
@lenox-joseph lenox-joseph deleted the fix-gdm-casing branch July 5, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bash Bash remediation update. bugfix Fixes to reported bugs. needs-ok-to-test Used by openshift-ci bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants