Skip to content

Fix chronyd_server_directive - #15105

Open
alanmcanonical wants to merge 3 commits into
ComplianceAsCode:masterfrom
alanmcanonical:chronyd_server_directive_oval
Open

Fix chronyd_server_directive#15105
alanmcanonical wants to merge 3 commits into
ComplianceAsCode:masterfrom
alanmcanonical:chronyd_server_directive_oval

Conversation

@alanmcanonical

Copy link
Copy Markdown
Contributor

Description:

  • Fix sed in chronyd_server_directive tests/
  • Add mixed pool and server entries test case for chronyd_server_directive
  • Fix oval regex

Rationale:

  • sed contains a syntax error
  • Only entries starting with \s*server is allowed

Signed-off-by: Alan Moore <alan.moore@canonical.com>
Signed-off-by: Alan Moore <alan.moore@canonical.com>
Signed-off-by: Alan Moore <alan.moore@canonical.com>
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Sep 9, 2026
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

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-sigs/prow repository.

@alanmcanonical

alanmcanonical commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

test result before fix (added mixed.fail.sh):

libvirt: QEMU Driver error : argument unsupported: QEMU guest agent is not configured
INFO - xccdf_org.ssgproject.content_rule_chronyd_server_directive
INFO - Script file_empty.fail.sh using profile (all) OK
INFO - Script multiple_servers.pass.sh using profile (all) OK
INFO - Script line_missing.fail.sh using profile (all) OK
INFO - Script file_missing.fail.sh using profile (all) OK
INFO - Script only_pool.fail.sh using profile (all) OK
ERROR - Script mixed.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_chronyd_server_directive'.
INFO - Script only_server.pass.sh using profile (all) OK

test result after fix:

python3 tests/automatus.py rule --libvirt qemu:///system sec-noble-amd64 --datastream build/ssg-ubuntu2404-ds.xml --remediate-using bash --profile chronyd_server_directive chronyd_server_directive --profile (all)
Setting console output to log level INFO

INFO - xccdf_org.ssgproject.content_rule_chronyd_server_directive
INFO - Script file_empty.fail.sh using profile (all) OK
INFO - Script multiple_servers.pass.sh using profile (all) OK
INFO - Script line_missing.fail.sh using profile (all) OK
INFO - Script file_missing.fail.sh using profile (all) OK
INFO - Script only_pool.fail.sh using profile (all) OK
INFO - Script mixed.fail.sh using profile (all) OK
WARNING - No remediation is available for rule 'xccdf_org.ssgproject.content_rule_chronyd_server_directive'.
INFO - Script only_server.pass.sh using profile (all) OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant