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 regex in Ansible remediation of configure_ssh_crypto_policy #11526

Conversation

vojtapolasek
Copy link
Collaborator

Description:

  • move the special extension string to the very beginning of the regex

Rationale:

  • the original regex is invalid

@vojtapolasek vojtapolasek added bugfix Fixes to reported bugs. Ansible Ansible remediation update. labels Feb 1, 2024
@vojtapolasek vojtapolasek added this to the 0.1.73 milestone Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

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

Copy link

github-actions bot commented Feb 1, 2024

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

Click here to see the full diff
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_configure_ssh_crypto_policy' differs.
--- xccdf_org.ssgproject.content_rule_configure_ssh_crypto_policy
+++ xccdf_org.ssgproject.content_rule_configure_ssh_crypto_policy
@@ -2,7 +2,7 @@
   lineinfile:
     dest: /etc/sysconfig/sshd
     state: absent
-    regexp: ^(?i)\s*CRYPTO_POLICY.*$
+    regexp: (?i)^\s*CRYPTO_POLICY.*$
   tags:
   - CCE-80939-2
   - DISA-STIG-RHEL-08-010287

Copy link

codeclimate bot commented Feb 1, 2024

Code Climate has analyzed commit c76620b 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 58.3% (0.0% change).

View more on Code Climate.

@Mab879 Mab879 self-assigned this Feb 1, 2024
@Mab879
Copy link
Member

Mab879 commented Feb 1, 2024

/packit retest-failed

@Mab879 Mab879 merged commit 49f48b0 into ComplianceAsCode:master Feb 1, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ansible Ansible remediation update. bugfix Fixes to reported bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants