-
Notifications
You must be signed in to change notification settings - Fork 706
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
Include rule for checking password last change in RHEL #10243
Include rule for checking password last change in RHEL #10243
Conversation
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.
The CI fail looks legit:
xccdf_org.ssgproject.content_rule_accounts_password_last_change_is_in_past:unknown
from a quick look I can't find what it is
The accounts_password_last_change_is_in_past rule also satisfies the CIS requirements for RHEL7, RHEL8 and RHEL9.
The OVAL check returns "unknown" when there is no password defined in the /etc/shadow file. It is necessary to include a test scenario for this case since it is relatively common to happen.
24400c9
to
13ac521
Compare
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_accounts_password_last_change_is_in_past'.
--- xccdf_org.ssgproject.content_rule_accounts_password_last_change_is_in_past
+++ xccdf_org.ssgproject.content_rule_accounts_password_last_change_is_in_past
@@ -8,6 +8,12 @@
[warning]:
Automatic remediation is not available, in order to avoid any system disruption.
+[reference]:
+5.6.1.5
+
[rationale]:
If a user recorded password change date is in the future then they could
bypass any set password expiration.
+
+[ident]:
+CCE-86525-3
OVAL for rule 'xccdf_org.ssgproject.content_rule_accounts_password_last_change_is_in_past' differs.
--- oval:ssg-accounts_password_last_change_is_in_past:def:1
+++ oval:ssg-accounts_password_last_change_is_in_past:def:1
@@ -1,2 +1,3 @@
-criteria None
-criterion oval:ssg-test_accounts_password_last_change_time_secs:tst:1
+criteria OR
+criterion oval:ssg-test_accounts_password_last_change_is_in_past:tst:1
+criterion oval:ssg-test_accounts_password_last_change_is_in_past_no_pass:tst:1 |
The previous check was reporting "unknown" when there is no password defined in the /etc/shadow file of the checked system. Before, it was not clear the reason for the unknown result. Therefore, a new test was included to check if passwords are inexistent in the system. The rule is no longer reporting "unknown" and the generated reports are more clearly informing which checks passed or not.
13ac521
to
8def7b5
Compare
Code Climate has analyzed commit 8def7b5 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 51.7% (0.0% change). View more on Code Climate. |
The 8def7b5 fixes this issue. More details in the commit description. |
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.
Thank you, I have checked that the rule has been tested by Automatus on cs8 and cs9.
Description:
The
accounts_password_last_change_is_in_past
rule also satisfies the CIS requirements for RHEL7, RHEL8 and RHEL9.Rationale:
Better CIS coverage for RHEL.