Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Xeicker
Copy link
Contributor

@Xeicker Xeicker commented Jul 1, 2025

Description:

  • Add regex for the lineinfile module so if the configuration is already there it fixes it instead of adding a new line

Rationale:

  • Improve ansible remediation

Review Hints:

  • Now automatus tests pass remediating with ansible

@Xeicker Xeicker added this to the 0.1.78 milestone Jul 1, 2025
@Xeicker Xeicker requested a review from matusmarhefka as a code owner July 1, 2025 17:00
@Xeicker Xeicker added the Ansible Ansible remediation update. label Jul 1, 2025
Copy link

Code Climate has analyzed commit 846f5e8 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 61.9% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny self-assigned this Jul 2, 2025
@jan-cerny
Copy link
Collaborator

/packit build

Copy link
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.

jcerny@fedora:~/work/git/scap-security-guide (pr/13650)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 auditd_data_retention_action_mail_acct
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-07-02-0933/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_auditd_data_retention_action_mail_acct
INFO - Script action_mail_acct_root.pass.sh using profile (all) OK
INFO - Script action_mail_acct_alias.fail.sh using profile (all) OK
INFO - Script action_mail_acct_email.fail.sh using profile (all) OK
INFO - Script action_mail_acct_not_there.fail.sh using profile (all) OK
jcerny@fedora:~/work/git/scap-security-guide (pr/13650)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 --remediate-using ansible auditd_data_retention_action_mail_acct
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-07-02-0936/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_auditd_data_retention_action_mail_acct
INFO - Script action_mail_acct_root.pass.sh using profile (all) OK
INFO - Script action_mail_acct_alias.fail.sh using profile (all) OK
INFO - Script action_mail_acct_email.fail.sh using profile (all) OK
INFO - Script action_mail_acct_not_there.fail.sh using profile (all) OK

@jan-cerny
Copy link
Collaborator

/packit build

@jan-cerny jan-cerny merged commit a398c7d into ComplianceAsCode:master Jul 7, 2025
129 of 131 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants