Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
384c097f8a | ||
|
|
999e5fa210 | ||
|
|
215c8042ad | ||
|
|
21ca7c533a | ||
|
|
5debcc0c6f | ||
|
|
92bd94a0cf | ||
|
|
aea4499805 | ||
|
|
29945527b8 |
No files matched your search
+16
-1
@@ -1,6 +1,20 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [7.11.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.11.0) (2021-08-28)
|
## [7.11.1](https://github.com/dev-sec/ansible-collection-hardening/tree/7.11.1) (2021-10-18)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.11.0...7.11.1)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- change baseline urls to full zip-url [\#490](https://github.com/dev-sec/ansible-collection-hardening/pull/490) [[mysql_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/mysql_hardening)] [[os_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/os_hardening)] [[ssh_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/ssh_hardening)] [[nginx_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/nginx_hardening)] ([rndmh3ro](https://github.com/rndmh3ro))
|
||||||
|
- fix filter error in ansible.builtin.file mode parameter [\#486](https://github.com/dev-sec/ansible-collection-hardening/pull/486) [[ssh_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/ssh_hardening)] ([ssttehrani](https://github.com/ssttehrani))
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- os\_hardening fails on "Create a combined sysctl-dict if overwrites are defined" task [\#482](https://github.com/dev-sec/ansible-collection-hardening/issues/482)
|
||||||
|
- Improve changelog generation [\#381](https://github.com/dev-sec/ansible-collection-hardening/issues/381)
|
||||||
|
|
||||||
|
## [7.11.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.11.0) (2021-08-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.10.0...7.11.0)
|
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.10.0...7.11.0)
|
||||||
|
|
||||||
@@ -16,6 +30,7 @@
|
|||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- ssh\_allow\_tcp\_forwarding is not a boolean [\#480](https://github.com/dev-sec/ansible-collection-hardening/pull/480) [[ssh_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/ssh_hardening)] ([ReinerNippes](https://github.com/ReinerNippes))
|
||||||
- chore\(ssh\_hardening\): set min\_ansible\_version to \>=2.9.10 [\#479](https://github.com/dev-sec/ansible-collection-hardening/pull/479) [[ssh_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/ssh_hardening)] ([bufferoverflow](https://github.com/bufferoverflow))
|
- chore\(ssh\_hardening\): set min\_ansible\_version to \>=2.9.10 [\#479](https://github.com/dev-sec/ansible-collection-hardening/pull/479) [[ssh_hardening](https://github.com/dev-sec/ansible-collection-hardening/labels/ssh_hardening)] ([bufferoverflow](https://github.com/bufferoverflow))
|
||||||
|
|
||||||
## [7.10.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.10.0) (2021-08-15)
|
## [7.10.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.10.0) (2021-08-15)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
namespace: devsec
|
namespace: devsec
|
||||||
name: hardening
|
name: hardening
|
||||||
version: 7.10.0
|
version: 7.11.0
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- dev-sec <[email protected]>
|
- dev-sec <[email protected]>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
||||||
|
|
||||||
- name: Execute cinc-auditor tests
|
- name: Execute cinc-auditor tests
|
||||||
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit supermarket://dev-sec/mysql-baseline"
|
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit https://github.com/dev-sec/mysql-baseline/archive/refs/heads/master.zip"
|
||||||
register: test_results
|
register: test_results
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
||||||
|
|
||||||
- name: Execute cinc-auditor tests
|
- name: Execute cinc-auditor tests
|
||||||
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit supermarket://dev-sec/nginx-baseline"
|
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit https://github.com/dev-sec/nginx-baseline/archive/refs/heads/master.zip"
|
||||||
register: test_results
|
register: test_results
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
||||||
|
|
||||||
- name: Execute cinc-auditor tests
|
- name: Execute cinc-auditor tests
|
||||||
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit supermarket://dev-sec/linux-baseline"
|
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit https://github.com/dev-sec/linux-baseline/archive/refs/heads/master.zip"
|
||||||
register: test_results
|
register: test_results
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
shell: "bash /tmp/install.sh -s -- -P cinc-auditor -v 4"
|
||||||
|
|
||||||
- name: Execute cinc-auditor tests
|
- name: Execute cinc-auditor tests
|
||||||
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit supermarket://dev-sec/nginx-baseline"
|
command: "/opt/cinc-auditor/bin/cinc-auditor exec --no-show-progress --no-color --no-distinct-exit https://github.com/dev-sec/ssh-baseline/archive/refs/heads/master.zip"
|
||||||
register: test_results
|
register: test_results
|
||||||
changed_when: false
|
changed_when: false
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|||||||
@@ -27,19 +27,43 @@
|
|||||||
- "{{ minimize_access_directories.results }}"
|
- "{{ minimize_access_directories.results }}"
|
||||||
- stdout_lines
|
- stdout_lines
|
||||||
|
|
||||||
|
- name: Find shadow files
|
||||||
|
stat:
|
||||||
|
path: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- '/etc/shadow'
|
||||||
|
- '/etc/gshadow'
|
||||||
|
- '/etc/shadow-'
|
||||||
|
- '/etc/gshadow-'
|
||||||
|
register: minimize_access_shadow_files
|
||||||
|
|
||||||
- name: Change shadow ownership to root and mode to 0600 | os-02
|
- name: Change shadow ownership to root and mode to 0600 | os-02
|
||||||
file:
|
file:
|
||||||
dest: '/etc/shadow'
|
dest: "{{ item.item }}"
|
||||||
owner: '{{ os_shadow_perms.owner }}'
|
owner: '{{ os_shadow_perms.owner }}'
|
||||||
group: '{{ os_shadow_perms.group }}'
|
group: '{{ os_shadow_perms.group }}'
|
||||||
mode: '{{ os_shadow_perms.mode }}'
|
mode: '{{ os_shadow_perms.mode }}'
|
||||||
|
when: item.stat.exists
|
||||||
|
loop: "{{ minimize_access_shadow_files.results }}"
|
||||||
|
|
||||||
|
- name: Find passwd files
|
||||||
|
stat:
|
||||||
|
path: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- '/etc/passwd'
|
||||||
|
- '/etc/group'
|
||||||
|
- '/etc/passwd-'
|
||||||
|
- '/etc/group-'
|
||||||
|
register: minimize_access_passwd_files
|
||||||
|
|
||||||
- name: Change passwd ownership to root and mode to 0644 | os-03
|
- name: Change passwd ownership to root and mode to 0644 | os-03
|
||||||
file:
|
file:
|
||||||
dest: '/etc/passwd'
|
dest: "{{ item.item }}"
|
||||||
owner: '{{ os_passwd_perms.owner }}'
|
owner: '{{ os_passwd_perms.owner }}'
|
||||||
group: '{{ os_passwd_perms.group }}'
|
group: '{{ os_passwd_perms.group }}'
|
||||||
mode: '{{ os_passwd_perms.mode }}'
|
mode: '{{ os_passwd_perms.mode }}'
|
||||||
|
when: item.stat.exists
|
||||||
|
loop: "{{ minimize_access_passwd_files.results }}"
|
||||||
|
|
||||||
- name: Change su-binary to only be accessible to user and group root
|
- name: Change su-binary to only be accessible to user and group root
|
||||||
file:
|
file:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
- name: Create ssh authorized principals directories
|
- name: Create ssh authorized principals directories
|
||||||
file:
|
file:
|
||||||
path: '{{ item.path | dirname }}'
|
path: '{{ item.path | dirname }}'
|
||||||
mode: '{{ item.directorymode | default(0700) }}'
|
mode: '{{ item.directorymode | default("700") }}'
|
||||||
owner: '{{ item.directoryowner | default(ssh_owner) }}'
|
owner: '{{ item.directoryowner | default(ssh_owner) }}'
|
||||||
group: '{{ item.directorygroup | default(ssh_group) }}'
|
group: '{{ item.directorygroup | default(ssh_group) }}'
|
||||||
state: directory
|
state: directory
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
template:
|
template:
|
||||||
src: 'authorized_principals.j2'
|
src: 'authorized_principals.j2'
|
||||||
dest: '{{ item.path }}'
|
dest: '{{ item.path }}'
|
||||||
mode: '{{ item.filemode | default(0600) }}'
|
mode: '{{ item.filemode | default("600") }}'
|
||||||
owner: '{{ item.owner| default(ssh_owner) }}'
|
owner: '{{ item.owner| default(ssh_owner) }}'
|
||||||
group: '{{ item.group | default(ssh_group) }}'
|
group: '{{ item.group | default(ssh_group) }}'
|
||||||
loop: '{{ ssh_authorized_principals }}'
|
loop: '{{ ssh_authorized_principals }}'
|
||||||
Reference in new issue
Block a user