-
Notifications
You must be signed in to change notification settings - Fork 698
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
add new rule audit_rules_immutable_login_uids #10070
add new rule audit_rules_immutable_login_uids #10070
Conversation
immutable_found=0 | ||
for f in /etc/audit/rules.d/*.rules; do | ||
if grep -q '^\s*--loginuid-immutable\s*$' $f; then | ||
immutable_found=1 |
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.
indentation
fi | ||
else | ||
immutable_found=0 | ||
for f in /etc/audit/rules.d/*.rules; do |
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.
what if there is no .rules file in this directory?
else | ||
immutable_found=0 | ||
for f in /etc/audit/rules.d/*.rules; do | ||
if grep -q '^\s*--loginuid-immutable\s*$' $f; then |
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.
quote $f
fix indentation replace file loop with something more robust, taking advice of Shellcheck quoting the variable name
@jan-cerny feedback addressed in 2b8bf7e |
Code Climate has analyzed commit 2b8bf7e 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 49.7% (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.
I have checked that the supplied test scenarios have passed in the Automatus CS8 job in CI.
Description:
Rationale:
the rule checks for the only line "--loginuid-immutable" compared to rule audit_immutable_login_uids
It is related to this item: https://stigaview.com/products/rhel8/v1r8/RHEL-08-030122/
Fixes # Issue number here (e.g. Updating sysctl XCCDF naming #26) or remove this line if no issue exists.
Review Hints:
Review hints here. Replace this text. Don't use the italics format!
Use this optional section to give any relevant information which could help the reviewer to more quickly and assertively understand and test the changes.
Good examples are useful commands, if it is better to review all commits together or in a suggested sequence, any relevant discussion in other PRs or issues, etc.