Skip to content

Update grub2_uefi_password & grub2_uefi_admin_username#8438

Merged
jan-cerny merged 5 commits intoComplianceAsCode:masterfrom
Xeicker:grub2_uefi-rules-fixes
Apr 19, 2022
Merged

Update grub2_uefi_password & grub2_uefi_admin_username#8438
jan-cerny merged 5 commits intoComplianceAsCode:masterfrom
Xeicker:grub2_uefi-rules-fixes

Conversation

@Xeicker
Copy link
Copy Markdown
Contributor

@Xeicker Xeicker commented Mar 28, 2022

Description:

  • Removed for all products the criterion that allows OVAL to pass if <grub2_boot_path>/grub.cfg is missing. And remove unnecessary test accordingly.
  • Update OVAL criteria for OL8 and RHEL8 to only look for the GRUB2_PASSWORD configuration in the file <grub2_boot_path>/user.cfg
  • Set grub2_uefi_boot_path in OL8 product.yml

Rationale:

  • The absence of grub.cfg only make sense if grub is not installed, this situation is already managed by the grub CPE
  • For grub2_uefi_password:
    • It is better to check only the user.cfg file since this is the one generated by the command grub2-setpassword
    • The existence and validity of superusers is already addressed by Update grub2_uefi_admin_username and it is not required in the STIG IDs that grub2_uefi_password covers
  • The default grub2_uefi_boot_path was wrong

Edgar Aguilar added 4 commits March 28, 2022 13:12
DISA, in its STIG profile, requires this rule to verify only the
user.cfg file. Also specifies a grub directory for grub2_uefi_boot_path

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
DISA, in its STIG profile, requires this rule to verify only the
user.cfg file

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
This rule's OVAL was designed to pass if grub.cfg was missing,
apparently to allow a scenario were grub is not installed. Remove that
criterion from OVAL so that situation is managed by a CPE and remove
test accordingly

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
This rule's OVAL was designed to pass if grub.cfg was missing,
apparently to allow a scenario were grub is not installed. Remove that
criterion from OVAL so that situation is managed by a CPE and remove
test accordingly

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Mar 28, 2022
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 28, 2022

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

Details

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
Copy Markdown

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

Open in Gitpod

@github-actions
Copy link
Copy Markdown

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

Click here to see the full diff
OVAL definition oval:ssg-grub2_uefi_admin_username:def:1 differs:
--- old datastream
+++ new datastream
- criterion oval:ssg-test_grub2_uefi_admin_username_file_boot_efi_EFI_redhat_grub_cfg_absent:tst:1
OVAL definition oval:ssg-grub2_uefi_password:def:1 differs:
--- old datastream
+++ new datastream
- criterion oval:ssg-test_grub2_uefi_password_file_boot_efi_EFI_redhat_grub_cfg_absent:tst:1
- criteria AND
- criteria OR
- criterion oval:ssg-test_grub2_uefi_password_grubcfg:tst:1
- criterion oval:ssg-test_bootloader_uefi_superuser:tst:1

@Mab879
Copy link
Copy Markdown
Member

Mab879 commented Mar 30, 2022

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Used by openshift-ci bot. and removed needs-ok-to-test Used by openshift-ci bot. labels Mar 30, 2022
@jan-cerny jan-cerny self-assigned this Mar 31, 2022
Comment thread linux_os/guide/system/bootloader-grub2/uefi/grub2_uefi_password/oval/shared.xml Outdated
Make previous changes which were only applicable to ol8 and rhel8,
apply to all products

Signed-off-by: Edgar Aguilar <edgar.aguilar@oracle.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 18, 2022

@Xeicker: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-rhcos4-moderate 2daeb5b link true /test e2e-aws-rhcos4-moderate
ci/prow/e2e-aws-rhcos4-high 2daeb5b link true /test e2e-aws-rhcos4-high

Full PR test history. Your PR dashboard.

Details

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.

Copy link
Copy Markdown
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

Thanks!

@jan-cerny jan-cerny merged commit 31f6ffc into ComplianceAsCode:master Apr 19, 2022
@jan-cerny jan-cerny added this to the 0.1.62 milestone Apr 19, 2022
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Mar 6, 2026
Remove `invalid_username.fail.sh` that configures an invalid GRUB user
name. The reason is that starting from
ComplianceAsCode#8438 the rule
`grub2_uefi_password` no longer checks user names, it only checks
passwords now, no an invalid user name can't make the rule fail.
jan-cerny added a commit to jan-cerny/scap-security-guide that referenced this pull request Mar 6, 2026
Remove `invalid_username.fail.sh` that configures an invalid GRUB user
name. The reason is that starting from
ComplianceAsCode#8438 the rule
`grub2_uefi_password` no longer checks user names, it only checks
passwords now, no an invalid user name can't make the rule fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants