Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update STIG id of grub2_password #5986

Merged

Conversation

ggbecker
Copy link
Member

@ggbecker ggbecker commented Aug 6, 2020

Description:

- Since v2r1, RHEL7 STIG has a specific item to check for the GRUB2_PASSWORD in /boot/grub2/user.cfg (V-81005). So far we have this check embedded with the grub2_password rule from V-71961, the ideia here is to open the discussion if we should split into two separate rules.

  • Update STIG id of grub2_password to match STIG item that is RHEL >= 7.2 only (V-81005).

Similarly this apply for the UEFI related rules.

@openshift-ci-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Aug 6, 2020
@ggbecker ggbecker requested a review from redhatrises August 6, 2020 16:24
@mildas
Copy link
Contributor

mildas commented Aug 6, 2020

Changes identified:
Rule grub2_password:
 Attribute value changed in OVAL check.
 Text changed in OVAL check.
 Node deleted from OVAL check.
 New node inserted to OVAL check.
 Deleted attribute from OVAL check.
 Node moved within OVAL check.
 Text added outsite tags in OVAL check.
Rule grub2_superuser_password:
 The rule doesn't occur in any profile nor product.
 OVAL check is newly added.

Recommended tests to execute:
 build_product fedora
 tests/test_suite.py rule --libvirt qemu:///system test-suite-vm --remediate-using bash --datastream build/ssg-fedora-ds.xml grub2_password

@redhatrises
Copy link
Contributor

redhatrises commented Aug 6, 2020

What is the correct way to handle configure grub passwords? Obviously, there are multiple ways to configure, but we need to define the 1 correct way of checking this. So, if user.cfg is the correct way, creating a new rule rather than fixing the broken one probably isn't the correct way.

@ggbecker
Copy link
Member Author

ggbecker commented Aug 7, 2020

What is the correct way to handle configure grub passwords? Obviously, there are multiple ways to configure, but we need to define the 1 correct way of checking this. So, if user.cfg is the correct way, creating a new rule rather than fixing the broken one probably isn't the correct way.

Actually both ways are correct. The thing is that one check is applicable only to RHEL < 7.2 and the other to RHEL >= 7.2. One quick way to solve this would be to add both STIG ID to the same rule and that would be it.

Update1: Build system doesn't allow to have multiple STIG IDs assigned to the same rule.

@redhatrises
Copy link
Contributor

As we are now at RHEL 7.9, let's fix this for RHEL >= 7.2.

@ggbecker
Copy link
Member Author

As we are now at RHEL 7.9, let's fix this for RHEL >= 7.2.

The current rule already checks for RHEL >= 7.2 configuration, but also for RHEL < 7.2. The selected STIG ID is from the item that is RHEL < 7.2. So the proposal can be just to change the STIG ID to reference the item which covers RHEL >= 7.2.

@JAORMX
Copy link
Contributor

JAORMX commented Aug 11, 2020

/test all

@redhatrises
Copy link
Contributor

As we are now at RHEL 7.9, let's fix this for RHEL >= 7.2.

The current rule already checks for RHEL >= 7.2 configuration, but also for RHEL < 7.2. The selected STIG ID is from the item that is RHEL < 7.2. So the proposal can be just to change the STIG ID to reference the item which covers RHEL >= 7.2.

Sounds good. Should also do a spot check to verify that the rule.yml is correct for RHEL >= 7.2

@JAORMX
Copy link
Contributor

JAORMX commented Aug 17, 2020

/retest

@ggbecker ggbecker force-pushed the add-stig-RHEL-07-010482 branch from ac42ab3 to 824004f Compare August 18, 2020 14:14
@ggbecker
Copy link
Member Author

ggbecker commented Aug 18, 2020

As we are now at RHEL 7.9, let's fix this for RHEL >= 7.2.

The current rule already checks for RHEL >= 7.2 configuration, but also for RHEL < 7.2. The selected STIG ID is from the item that is RHEL < 7.2. So the proposal can be just to change the STIG ID to reference the item which covers RHEL >= 7.2.

Sounds good. Should also do a spot check to verify that the rule.yml is correct for RHEL >= 7.2

The only needed change was to update the STIG id. Tests scenarios already cover correctness of rule for RHEL >= 7.2.

@ggbecker ggbecker changed the title Break down grub2_password into two rules. Update STIG id of grub2_password Aug 18, 2020
@ggbecker ggbecker marked this pull request as ready for review August 18, 2020 14:18
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Aug 18, 2020
@openshift-ci-robot
Copy link
Collaborator

@ggbecker: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-rhcos4-moderate 824004f link /test e2e-aws-rhcos4-moderate

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@redhatrises redhatrises merged commit 1b3d8dc into ComplianceAsCode:master Aug 18, 2020
@marcusburghardt marcusburghardt added RHEL7 Red Hat Enterprise Linux 7 product related. STIG STIG Benchmark related. labels Jun 23, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
RHEL7 Red Hat Enterprise Linux 7 product related. STIG STIG Benchmark related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants