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

oscap scannner found 2 issues in sshd configuration override files #172

Closed
wants to merge 2 commits into from
Closed

Conversation

bbaassssiiee
Copy link
Member

@bbaassssiiee bbaassssiiee commented Feb 9, 2024

Overall Review of Changes:
We like control over PermitRootLogin and X11Forwarding.
We should also fix the config files created by the installer.

Issue Fixes:

Enhancements:

How has this been tested?:

---

- name: Security Audit
  hosts: all
  become: true
  gather_facts: true

  pre_tasks:

    - name: Install packages
      ansible.builtin.package:
        state: present
        name:
          - openscap-scanner
          - scap-security-guide

  post_tasks:

    - name: Run CIS oscap scan and create /tmp/report.html
      ansible.builtin.command:
        oscap xccdf eval --profile cis \
          --report /tmp/report.html \
          /usr/share/xml/scap/ssg/content/ssg-almalinux9-ds.xml
      changed_when: true
      no_log: false
      register: scan_return
      failed_when: scan_return.stdout is not defined

    - name: Set permissions
      ansible.builtin.file:
        path: /tmp/report.html
        owner: "{{ ansible_ssh_user }}"
        mode: '0600'

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the Discord Server as well.

@bbaassssiiee
Copy link
Member Author

I used the wrong branch for the PR.

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.

1 participant