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

Add test scenarios specific for CIS #7634

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

jan-cerny
Copy link
Collaborator

Description:

This commit adds test scenarios specific for the RHEL7 CIS Level 2
profile for rules accounts_password_pam_pwhistory_remember_system_auth
and accounts_password_pam_pwhistory_remember_password_auth. The test
scenarios were copied from existing correct value pass scenario
and the values have been set according to item 5.4.4 in
controls/cis_rhel7.yml.

Rationale:

Increase test coverage of CIS profile.

This commit adds test scenarios specific for the RHEL7 CIS Level 2
profile for rules accounts_password_pam_pwhistory_remember_system_auth
and accounts_password_pam_pwhistory_remember_password_auth. The test
scenarios were copied from existing correct value pass scenario
and the values have been set according to item 5.4.4 in
controls/cis_rhel7.yml.
Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

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

Thank you for well commented tests.
See comments.
Actually @matusmarhefka doers it make sense to add remaining CIS profiles? Does it make sense when testing for example in profile mode in SSG test suite?

#!/bin/bash
# packages = pam
# platform = Red Hat Enterprise Linux 7
# profiles = xccdf_org.ssgproject.content_profile_cis
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you also add remaining cis profiles?

#!/bin/bash
# packages = pam
# platform = Red Hat Enterprise Linux 7
# profiles = xccdf_org.ssgproject.content_profile_cis
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please add also remaining cis profiles?

@matusmarhefka
Copy link
Member

Thank you for well commented tests.
See comments.
Actually @matusmarhefka doers it make sense to add remaining CIS profiles? Does it make sense when testing for example in profile mode in SSG test suite?

Test scenarios are only executed in rule/combined mode. I think in this case it is enough to have just cis in profiles metadata, these rules are the same in all cis profiles so I don't see a value in running them 4 times and testing the same thing.

The new name emphasises that the scenario is only for RHRL 7 CIS.
@matusmarhefka matusmarhefka merged commit f1a34e3 into ComplianceAsCode:master Sep 27, 2021
@matusmarhefka matusmarhefka self-assigned this Sep 27, 2021
@marcusburghardt marcusburghardt added the Test Suite Update in Test Suite. label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Suite Update in Test Suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants