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

Fix chronyd remote server filepath dir regex #12312

Conversation

yuumasato
Copy link
Member

@yuumasato yuumasato commented Aug 19, 2024

Description:

  • Fixes the regular expression that matches chrony.d/*.conf files.
    Remove extra forward slash in chronyd_specify_remote_server OVAL filepath

Rationale:

  • The rule was likely only working for Debian regarding drop-in chronyd files, as its product.yml configured a chrony_d_path without a trailing slash.

Review Hints:

Fixes the regular expression that matches 'chrony.d/*.conf' files.

The default path in the project already contains a trailing forward
slash, the rule's filepath was adding an extra slash and causing rule
not to be found.

The rule was likely only working for Debian, as it's product.yml
configures a 'chrony_d_path` without a trailing slash.
Copy link

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

@yuumasato
Copy link
Member Author

/test e2e-aws-rhcos4-high
/test e2e-aws-rhcos4-moderate
/test 4.17-e2e-aws-rhcos4-moderate
/test 4.13-e2e-aws-rhcos4-moderate

Copy link

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12312
This image was built from commit: 9185aee

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12312

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12312 make deploy-local

Copy link

codeclimate bot commented Aug 19, 2024

Code Climate has analyzed commit 9185aee 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 59.4% (0.0% change).

View more on Code Climate.

@dodys dodys added this to the 0.1.75 milestone Aug 19, 2024
@dodys dodys self-assigned this Aug 19, 2024
Copy link
Contributor

@dodys dodys left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@dodys dodys merged commit d484bc7 into ComplianceAsCode:master Aug 19, 2024
95 of 101 checks passed
@yuumasato yuumasato deleted the fix_chronyd_remote_server_dir_path_regex branch August 19, 2024 12:10
@Mab879 Mab879 added the Update Rule Issues or pull requests related to Rules updates. label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Update Rule Issues or pull requests related to Rules updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants