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

Adds Ubuntu Jammy & Rocky 9 CIS benchmark hardening playbooks #685

Merged
merged 17 commits into from
Nov 15, 2023

Conversation

jovial
Copy link
Contributor

@jovial jovial commented Oct 4, 2023

No description provided.

@jovial jovial force-pushed the feature/yoga/cis branch 2 times, most recently from a7af96c to 5b57320 Compare October 4, 2023 17:40
@jovial jovial changed the title Adds Ubuntu Jammy CIS benchmark hardening playbooks Adds Ubuntu Jammy & Rocky 9 CIS benchmark hardening playbooks Oct 6, 2023
@jovial
Copy link
Contributor Author

jovial commented Oct 18, 2023

@MoteHue
Copy link
Contributor

MoteHue commented Oct 18, 2023

Just to note that setting rhelcis_rule_5_5_6: false should be done, as we have root passwords locked. This is as secure as (if not more than) setting a root password, but the check will fail as a password isn't technically set.

@jovial jovial marked this pull request as ready for review October 18, 2023 16:55
@jovial jovial requested a review from a team as a code owner October 18, 2023 16:55
doc/source/configuration/security.rst Outdated Show resolved Hide resolved
doc/source/configuration/security.rst Outdated Show resolved Hide resolved
doc/source/configuration/security.rst Outdated Show resolved Hide resolved
etc/kayobe/ansible/requirements.yml Show resolved Hide resolved
etc/kayobe/ansible/cis.yml Outdated Show resolved Hide resolved
doc/source/configuration/index.rst Outdated Show resolved Hide resolved
Co-authored-by: Alex-Welsh <[email protected]>
Co-authored-by: Mark Goddard <[email protected]>
Co-authored-by: Matt Crees <[email protected]>
doc/source/configuration/index.rst Outdated Show resolved Hide resolved
doc/source/configuration/security.rst Outdated Show resolved Hide resolved
doc/source/configuration/security.rst Outdated Show resolved Hide resolved
etc/kayobe/ansible/cis.yml Outdated Show resolved Hide resolved
etc/kayobe/ansible/requirements.yml Outdated Show resolved Hide resolved
etc/kayobe/ansible/requirements.yml Outdated Show resolved Hide resolved
etc/kayobe/ansible/requirements.yml Show resolved Hide resolved
@markgoddard
Copy link
Contributor

Did you test it with check/diff mode?

@jovial
Copy link
Contributor Author

jovial commented Nov 15, 2023

Did you test it with check/diff mode?

No, that could be pretty useful though. Will see if my test environment is still on SMS.

@jovial jovial merged commit c872280 into stackhpc/yoga Nov 15, 2023
15 checks passed
@jovial jovial deleted the feature/yoga/cis branch November 15, 2023 09:54
@jovial
Copy link
Contributor Author

jovial commented Nov 15, 2023

Did you test it with check/diff mode?

No, that could be pretty useful though. Will see if my test environment is still on SMS.

There seems to be a few issues in check mode:

TASK [ansible-lockdown.ubuntu22_cis : "4.1.4.1 | PATCH | Ensure audit log files are mode 0640 or less permissive"
"4.1.4.2 | PATCH | Ensure only authorized users own audit log files"
"4.1.4.3 | PATCH | Ensure only authorized groups are assigned ownership of audit log files"] ***
Wednesday 15 November 2023  10:46:52 +0000 (0:00:00.469)       0:01:43.464 ****
fatal: [controller0]: FAILED! => 
  msg: |-
    The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'mode'
  
    The error appears to be in '/home/cloud-user/kayobe-env-yoga-2/src/kayobe-config/etc/kayobe/ansible/roles/ansible-lockdown.ubuntu22_cis/tasks/section_4/cis_4.1.4.x.yml': line 20, column 9, but may                              
    be elsewhere in the file depending on the exact syntax problem.
  
    The offending line appears to be:
  
  
          - name: |
            ^ here

Seems like we need check_mode: true on a few stat tasks.

@markgoddard
Copy link
Contributor

Did you test it with check/diff mode?

No, that could be pretty useful though. Will see if my test environment is still on SMS.

There seems to be a few issues in check mode:

TASK [ansible-lockdown.ubuntu22_cis : "4.1.4.1 | PATCH | Ensure audit log files are mode 0640 or less permissive"
"4.1.4.2 | PATCH | Ensure only authorized users own audit log files"
"4.1.4.3 | PATCH | Ensure only authorized groups are assigned ownership of audit log files"] ***
Wednesday 15 November 2023  10:46:52 +0000 (0:00:00.469)       0:01:43.464 ****
fatal: [controller0]: FAILED! => 
  msg: |-
    The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'mode'
  
    The error appears to be in '/home/cloud-user/kayobe-env-yoga-2/src/kayobe-config/etc/kayobe/ansible/roles/ansible-lockdown.ubuntu22_cis/tasks/section_4/cis_4.1.4.x.yml': line 20, column 9, but may                              
    be elsewhere in the file depending on the exact syntax problem.
  
    The offending line appears to be:
  
  
          - name: |
            ^ here

Seems like we need check_mode: true on a few stat tasks.

Not too surprising. Never mind.

This was referenced Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants