Skip to content

Update test scenario to make sure there are no compliant state#14007

Merged
jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
ggbecker:grub2_password-invalid_username-fail
Oct 13, 2025
Merged

Update test scenario to make sure there are no compliant state#14007
jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
ggbecker:grub2_password-invalid_username-fail

Conversation

@ggbecker
Copy link
Copy Markdown
Member

Description:

  • Update test scenario to make sure there are no compliant state.
    • The default file might contain compliant configuration that trips the test scenario setup. We force all config values to deviate from compliance state.

Rationale:

Review Hints:

  • Build the RHEL9 product
  • tests/automatus.py rule --libvirt qemu:///system rhel9 --debug --datastream build/ssg-rhel9-ds.xml --remediate-using bash --scenarios invalid_username.fail.sh grub2_password

The default file might contain compliant configuration that trips the
test scenario setup. We force all config values to deviate from
compliance state.
@ggbecker ggbecker added this to the 0.1.79 milestone Oct 10, 2025
@ggbecker ggbecker added the Test Suite Update in Test Suite. label Oct 10, 2025
@jan-cerny jan-cerny changed the title Update test scenario to make sure there are no compliant state. Update test scenario to make sure there are no compliant state Oct 10, 2025
@jan-cerny jan-cerny self-assigned this Oct 10, 2025
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.

I confirm this has fixed the case for me.

Before:

jcerny@fedora:~/work/git/scap-security-guide (master)$  python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 grub2_password
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-10-10-1712/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_grub2_password
INFO - Script missing.fail.sh using profile (all) OK
INFO - Script password-set.pass.sh using profile (all) OK
INFO - Script unquoted_username.pass.sh using profile (all) OK
ERROR - Script invalid_username.fail.sh using profile (all) found issue:
ERROR - Rule evaluation resulted in pass, instead of expected fail during initial stage 
ERROR - The initial scan failed for rule 'xccdf_org.ssgproject.content_rule_grub2_password'.

After:

jcerny@fedora:~/work/git/scap-security-guide (pr/14007)$  python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 grub2_password
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2025-10-10-1716/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_grub2_password
INFO - Script missing.fail.sh using profile (all) OK
INFO - Script password-set.pass.sh using profile (all) OK
INFO - Script unquoted_username.pass.sh using profile (all) OK
INFO - Script invalid_username.fail.sh using profile (all) OK

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Oct 10, 2025

@ggbecker: The following test 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-openshift-node-compliance 22cacae link true /test e2e-aws-openshift-node-compliance

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

@jan-cerny
Copy link
Copy Markdown
Collaborator

/packit build

@jan-cerny jan-cerny merged commit 7a53d38 into ComplianceAsCode:master Oct 13, 2025
135 of 136 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Test Suite Update in Test Suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/per-rule/oscap/.+/grub2_password/invalid_username.fail is passing

2 participants