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

Improved alphanumeric_symbols regex to cover certain SCA remediation fields #16756

Merged

Conversation

EduLeon12
Copy link
Contributor

@EduLeon12 EduLeon12 commented Apr 18, 2023

Related issue
Closes #15465

Description

As described in #15465 , A new regex was implemented to cover certain SCA remediation fields that were previously not being matched by current regex.

The solution has been tested and results are provided in the issue.

Tests

Remediation field:

"If cron will be used to schedule and run aide check: Run the following command: # crontab -u root -e Add the following line to the crontab: 0 5 * * * /usr/bin/aide.wrapper --config /etc/aide/aide.conf --check OR If aidecheck.service and aidecheck.timer will be used to schedule and run aide check: Create or edit the file /etc/systemd/system/aidecheck.service and add the following lines: [Unit] Description=Aide Check [Service] Type=simple ExecStart=/usr/bin/aide.wrapper --config /etc/aide/aide.conf --check [Install] WantedBy=multi-user.target Create or edit the file /etc/systemd/system/aidecheck.timer and add the following lines: [Unit] Description=Aide check every day at 5AM [Timer] OnCalendar=*-*-* 05:00:00 Unit=aidecheck.service [Install] WantedBy=multi-user.target Run the following commands: # chown root:root /etc/systemd/system/aidecheck.* # chmod 0644 /etc/systemd/system/aidecheck.* # systemctl daemon-reload # systemctl enable aidecheck.service # systemctl --now enable aidecheck.timer"

Current Regex

image

After regex changes.

image

@EduLeon12 EduLeon12 self-assigned this Apr 18, 2023
@EduLeon12 EduLeon12 changed the title Added new symbol to regex for certain SCA remediation fields Improved alphanumeric_symbols regex to cover certain SCA remediation fields Apr 18, 2023
@EduLeon12 EduLeon12 linked an issue Apr 19, 2023 that may be closed by this pull request
4 tasks
nico-stefani
nico-stefani previously approved these changes Apr 20, 2023
Copy link
Member

@nico-stefani nico-stefani left a comment

Choose a reason for hiding this comment

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

LGTM!

@EduLeon12 EduLeon12 force-pushed the fix/15465-fix-regex-for-certain-sca-remediation-fields branch from 069648a to c841b1a Compare April 26, 2023 15:47
@EduLeon12 EduLeon12 force-pushed the fix/15465-fix-regex-for-certain-sca-remediation-fields branch from c841b1a to df2b5db Compare May 10, 2023 13:12
@davidjiglesias davidjiglesias merged commit 04b93fe into 4.5 May 16, 2023
48 checks passed
@davidjiglesias davidjiglesias deleted the fix/15465-fix-regex-for-certain-sca-remediation-fields branch May 16, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix alphanumeric_symbols regex for certain SCA remediation fields
3 participants