Closed jan-cerny closed 1 week ago
This datastream diff is auto generated by the check Compare DS/Generate Diff
Code Climate has analyzed commit 46c1aaa8 and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 0.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 60.9% (0.0% change).
View more on Code Climate.
Unfortunately, the change revealed that we have similar problems also in other rules, eg. display_login_attempts
.
Not everything is caught by the tests. The scenarios might pass, but if you look at the diff in the comment above, some of the differences are unwanted and they affect the behavior of the remediations. We need to address these changes or create a different solution for this rule.
I will fix display_login_attempts by https://github.com/ComplianceAsCode/content/pull/12603.
If
authselect
doesn't exist and no entry for group + control + module is present in/etc/pam.d/system-auth
the Bash remediation inserted square brackets with backslashes tosystem-auth
. The backslashes shouldn't be inserted there.The issue manifested when the Bash remediation is used during a build of a bootable container image.
The solution is to escape the control string only if it's a part of a regular expression (in
sed
andgrep
commands) but not escape the control string if it's used inecho
command.