-
Notifications
You must be signed in to change notification settings - Fork 685
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: use grep -E instead of deprecated egrep #10643
Conversation
From grep(1): In addition, the variant programs egrep and fgrep are the same as grep -E and grep -F, respectively. These variants are deprecated, but are provided for backward compatibility. Made using: git grep -l egrep docs .github linux_os|xargs -r \ sed -Ei 's/egrep -/grep -E/g;s/egrep /grep -E /g'
Hi @maage. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
This datastream diff is auto generated by the check Click here to see the full diffOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_networkconfig_modification' differs.%0A--- ocil:ssg-audit_rules_networkconfig_modification_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_networkconfig_modification_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A To determine if the system is configured to audit changes to its network configuration,%0A run the following command:%0A-auditctl -l | egrep '(/etc/issue|/etc/issue.net|/etc/hosts|/etc/sysconfig/network)'%0A+auditctl -l | grep -E '(/etc/issue|/etc/issue.net|/etc/hosts|/etc/sysconfig/network)'%0A If the system is configured to watch for network configuration changes, a line should be returned for%0A each file specified (and perm=wa should be indicated for each).%0A Is it the case that the system is not configured to audit changes of the network configuration?%0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A To determine if the system is configured to audit account changes,%0A run the following command:%0A-auditctl -l | egrep '(/etc/passwd|/etc/shadow|/etc/group|/etc/gshadow|/etc/security/opasswd)'%0A+auditctl -l | grep -E '(/etc/passwd|/etc/shadow|/etc/group|/etc/gshadow|/etc/security/opasswd)'%0A If the system is configured to watch for account changes, lines should be returned for%0A each file specified (and with perm=wa for each).%0A Is it the case that the system is not configured to audit account changes?%0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification_group' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_group_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_group_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A Verify Red Hat Enterprise Linux 8 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/group" with the following command:%0A %0A-$ sudo auditctl -l | egrep '(/etc/group)'%0A+$ sudo auditctl -l | grep -E '(/etc/group)'%0A %0A -w /etc/group -p wa -k identity%0A Is it the case that the command does not return a line, or the line is commented out?%0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification_gshadow' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_gshadow_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_gshadow_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A Verify Red Hat Enterprise Linux 8 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/gshadow" with the following command:%0A %0A-$ sudo auditctl -l | egrep '(/etc/gshadow)'%0A+$ sudo auditctl -l | grep -E '(/etc/gshadow)'%0A %0A -w /etc/gshadow -p wa -k identity%0A %0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification_opasswd' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_opasswd_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_opasswd_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A Verify Red Hat Enterprise Linux 8 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/security/opasswd" with the following command:%0A %0A-$ sudo auditctl -l | egrep '(/etc/security/opasswd)'%0A+$ sudo auditctl -l | grep -E '(/etc/security/opasswd)'%0A %0A -w /etc/security/opasswd -p wa -k identity%0A Is it the case that the command does not return a line, or the line is commented out?%0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification_passwd' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_passwd_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_passwd_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A Verify Red Hat Enterprise Linux 8 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/passwd" with the following command:%0A %0A-$ sudo auditctl -l | egrep '(/etc/passwd)'%0A+$ sudo auditctl -l | grep -E '(/etc/passwd)'%0A %0A -w /etc/passwd -p wa -k identity%0A Is it the case that the command does not return a line, or the line is commented out?%0A%0AOCIL for rule 'xccdf_org.ssgproject.content_rule_audit_rules_usergroup_modification_shadow' differs.%0A--- ocil:ssg-audit_rules_usergroup_modification_shadow_ocil:questionnaire:1%0A+++ ocil:ssg-audit_rules_usergroup_modification_shadow_ocil:questionnaire:1%0A@@ -1,6 +1,6 @@%0A Verify Red Hat Enterprise Linux 8 generates audit records for all account creations, modifications, disabling, and termination events that affect "/etc/passwd with the following command:%0A %0A-$ sudo auditctl -l | egrep '(/etc/shadow)'%0A+$ sudo auditctl -l | grep -E '(/etc/shadow)'%0A %0A -w /etc/shadow -p wa -k identity%0A Is it the case that command does not return a line, or the line is commented out? |
Code Climate has analyzed commit cf44903 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 52.5% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As good as it comes. No backward compatibility problems expected as egrep
was the alias for grep -E
for ages.
Thank you for the contribution.
Thanks |
Description:
Use
grep -E
instead ofegrep
.Rationale:
From grep(1):
More context: https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
Review Hints:
Changes are all over unfortunately.