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

Made some changes to CAT II #4

Merged
merged 14 commits into from
Aug 6, 2016
Merged
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ Role Variables

| Name | Default Value | Description |
|-------------------|---------------------|----------------------|
| `rhel7stig_cat1_patch` | `yes` | Correct CAT I findings |
| `rhel7stig_cat2_patch` | `no` | Correct CAT II findings |
| `rhel7stig_cat3_patch` | `no` | Correct CAT III findings |
| `rhel7stig_cat1_audit` | `yes` | Audit for CAT I findings |
| `rhel7stig_cat2_audit` | `no` | Audit for CAT II findings |
| `rhel7stig_cat3_audit` | `no` | Audit for CAT III findings |
| `rhel7stig_cat1_patch` | `yes` | Correct CAT I findings |
| `rhel7stig_cat2_patch` | `no` | Correct CAT II findings |
| `rhel7stig_cat3_patch` | `no` | Correct CAT III findings |
| `rhel7stig_gui` | `no` | Whether or not to run tasks related to auditing/patching the desktop environment |
| `rhel7stig_av_package` | `no` | Anti-virus package(s) to install and service to start and enable. |
| `rhel7stig_lftpd_required` | `no` | If set to `no`, remove `lftpd`. |
Expand Down
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ rhel7stig_cat1_patch: yes
rhel7stig_cat2_patch: no
rhel7stig_cat3_patch: no

# These values match patch values by defaults. To override these values,
# set them in group_vars, host_sars, or with the -e flag via CLI
rhel7stig_cat1_audit: "{{ rhel7stig_cat1_patch }}"
rhel7stig_cat2_audit: "{{ rhel7stig_cat2_patch }}"
rhel7stig_cat3_audit: "{{ rhel7stig_cat3_patch }}"

# Whether or not to run tasks related to auditing/patching the desktop environment
rhel7stig_gui: no

Expand Down
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@

- name: make grub2 config
command: grub2-mkconfig --output=/etc/grub2.cfg

- name: restart ntpd
service:
name: ntpd
state: restarted
79 changes: 79 additions & 0 deletions tasks/audit-cat2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
- name: "MEDIUM | RHEL-07-040180 | AUDIT | The operating system must implement cryptography to protect the integrity of Lightweight Directory Access Protocol (LDAP) authentication communications."
command: grep -i useldapauth /etc/sysconfig/authconfig
register: rhel_07_040180_audit
failed_when: no
changed_when: no
ignore_errors: yes
tags:
- cat2
- medium
- audit
- RHEL-07-040180
- ldap

- name: "MEDIUM | RHEL-07-040210 | AUDIT | The operating system must, for networked systems, synchronize clocks with a server that is synchronized to one of the redundant United States Naval Observatory (USNO) time servers, a time server designated for the appropriate DoD network (NIPRNet/SIPRNet), and/or the Global Positioning System (GPS)."
stat:
path: /etc/ntp.conf
register: rhel_07_040210_audit
failed_when: no
changed_when: no
ignore_errors: yes
tags:
- cat2
- medium
- audit
- RHEL-07-040210
- ntpd

- name: "MEDIUM | RHEL-07-040230 | AUDIT | The operating system, if using PKI-based authentication, must implement a local cache of revocation data to certificate validation in case of the inability to access revocation information via the network."
stat:
path: /var/lib/pki-kra/conf/server.xml
register: rhel_07_040230_audit
Copy link
Owner

Choose a reason for hiding this comment

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

Please add failed_when, changed_when, and ignore_errors to all audit tasks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

failed_when: no
changed_when: no
ignore_errors: yes
tags:
- cat2
- medium
- audit
- RHEL-07-040230
- always
- pki

- name: "MEDIUM | RHEL-07-040650 | AUDIT | The SSH private host key files must have mode 0600 or less permissive."
find:
paths: /
recurse: yes
file_type: file
patterns: '*ssh_host*key'
hidden: true
failed_when: no
changed_when: no
ignore_errors: yes
register: rhel_07_040650_audit
tags:
- cat2
- high
- audit
- RHEL-07-040650
- always
- ssh

- name: "MEDIUM | RHEL-07-040640 | AUDIT | The SSH public host key files must have mode 0644 or less permissive."
find:
paths: /
recurse: yes
file_type: file
patterns: '*.pub'
hidden: true
failed_when: no
changed_when: no
ignore_errors: yes
register: rhel_07_040640_audit
tags:
- cat2
- high
- audit
- RHEL-07-040640
- always
- ssh
6 changes: 6 additions & 0 deletions tasks/audit-cat3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: "Place holder for Cat III Audits"
command: "true"
tags:
- cat3
- low
- audit
Loading