Compare commits

...
15 Commits
Author SHA1 Message Date
schurzi a98876b350 update ansible-lint to version 5 (#397)
* add ansible to requirements

Signed-off-by: Martin Schurz <[email protected]>

* trigger run

Signed-off-by: Martin Schurz <[email protected]>

* update noqa for ansible-lint 5

Signed-off-by: Martin Schurz <[email protected]>
2021-02-10 13:47:01 +01:00
dev-sec CI 6d369739e4 update changelog 2021-02-10 11:59:07 +00:00
schurzi 2b39258d47 Merge pull request #395 from Normo/update-galaxy-version
fix galaxy action to update local galaxy.yml
2021-02-10 12:56:53 +01:00
Martin Schurz 75a8aca905 fix galaxy action to update local galaxy.yml
Signed-off-by: Martin Schurz <[email protected]>
2021-02-10 12:53:02 +01:00
Norman Ziegner b26b4e090c Bump collection version from 7.0.0 to 7.1.1
Signed-off-by: Norman Ziegner <[email protected]>
2021-02-10 10:11:15 +01:00
Norman Ziegner f035053381 Only set default for ssh host key files when hardening the server (#393)
Signed-off-by: Norman Ziegner <[email protected]>
2021-02-09 10:01:41 +01:00
rndmh3ro 0cfdb1954e Prettified Code! 2021-02-09 08:45:31 +00:00
Norman Ziegner 614662b99d Add variable to specify host rsa key size (#394)
Signed-off-by: Norman Ziegner <[email protected]>
2021-02-09 09:44:55 +01:00
dev-sec CI a17f4a6f45 update changelog 2021-02-05 19:42:47 +00:00
schurzi 30f03bc124 Merge pull request #390 from dev-sec/fix_docs
fix minimum required ansible version in docs
2021-02-05 20:40:42 +01:00
schurzi 40bc23d7da Prettified Code! 2021-02-05 19:39:43 +00:00
Martin Schurz c6114278a1 fix minimum required ansible version in docs
Signed-off-by: Martin Schurz <[email protected]>
2021-02-05 20:39:04 +01:00
dev-sec CI e833d1dce4 update changelog 2021-02-05 18:46:35 +00:00
schurzi 4b0819349d use fqcn for community.crypto.openssh_keypair module (#389)
tihis fixes a problem with Ansible 2.9 where the default openssh_keypair
is not supporting every option we need

Signed-off-by: Martin Schurz <[email protected]>
2021-02-05 19:44:23 +01:00
dev-sec CI 2f9cd82615 update changelog 2021-02-02 10:02:38 +00:00
10 changed files with 63 additions and 11 deletions

No files matched your search

+5
View File
@@ -20,6 +20,11 @@ jobs:
api_key: ${{ secrets.GALAXY_API_KEY }}
galaxy_version: ${{ github.event.release.tag_name }}
# checkout master instead of the release-tag so we can push the galaxy.yml
- uses: actions/checkout@v2
with:
ref: master
- name: update galaxy.yml with new version
uses: microsoft/variable-substitution@v1
with:
+39 -2
View File
@@ -1,8 +1,44 @@
# Changelog
## [Unreleased](https://github.com/dev-sec/ansible-collection-hardening/tree/HEAD)
## [7.2.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.2.0) (2021-02-10)
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.0.0...HEAD)
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.1.1...7.2.0)
**Implemented enhancements:**
- Add variable to specify SSH host RSA key size [\#394](https://github.com/dev-sec/ansible-collection-hardening/pull/394) ([Normo](https://github.com/Normo))
- Set default for ssh host key files only when hardening the server [\#393](https://github.com/dev-sec/ansible-collection-hardening/pull/393) ([Normo](https://github.com/Normo))
**Fixed bugs:**
- A reason why instance would go in rescue mode ? [\#267](https://github.com/dev-sec/ansible-collection-hardening/issues/267)
- fix galaxy action to update local galaxy.yml [\#395](https://github.com/dev-sec/ansible-collection-hardening/pull/395) ([Normo](https://github.com/Normo))
**Closed issues:**
- ssh\_hardening fail on keypair generation [\#388](https://github.com/dev-sec/ansible-collection-hardening/issues/388)
- The system must display the date and time of the last successful account logon upon an SSH logon. [\#362](https://github.com/dev-sec/ansible-collection-hardening/issues/362)
- Error in "root password is present" step [\#326](https://github.com/dev-sec/ansible-collection-hardening/issues/326)
**Merged pull requests:**
- fix minimum required ansible version in docs [\#390](https://github.com/dev-sec/ansible-collection-hardening/pull/390) ([schurzi](https://github.com/schurzi))
## [7.1.1](https://github.com/dev-sec/ansible-collection-hardening/tree/7.1.1) (2021-02-05)
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.1.0...7.1.1)
**Fixed bugs:**
- use fqcn for community.crypto.openssh\_keypair module [\#389](https://github.com/dev-sec/ansible-collection-hardening/pull/389) ([schurzi](https://github.com/schurzi))
**Closed issues:**
- AnsibleUndefinedVariable: 'ansible\_role\_name' is undefined with 7.1.0 [\#387](https://github.com/dev-sec/ansible-collection-hardening/issues/387)
## [7.1.0](https://github.com/dev-sec/ansible-collection-hardening/tree/7.1.0) (2021-02-02)
[Full Changelog](https://github.com/dev-sec/ansible-collection-hardening/compare/7.0.0...7.1.0)
**Implemented enhancements:**
@@ -38,6 +74,7 @@
**Merged pull requests:**
- use version tag for changelog action [\#386](https://github.com/dev-sec/ansible-collection-hardening/pull/386) ([schurzi](https://github.com/schurzi))
- make release workflow manually runnable [\#384](https://github.com/dev-sec/ansible-collection-hardening/pull/384) ([schurzi](https://github.com/schurzi))
- run labeler workflow with higher privileges [\#383](https://github.com/dev-sec/ansible-collection-hardening/pull/383) ([schurzi](https://github.com/schurzi))
- remove issue labels from changelog [\#382](https://github.com/dev-sec/ansible-collection-hardening/pull/382) ([schurzi](https://github.com/schurzi))
+1 -1
View File
@@ -36,7 +36,7 @@ This role is now part of the hardening-collection. You can find the old role in
## Minimum required Ansible-version
- > = 2.9.10
- Ansible >= 2.9.10
## Included content
+3 -2
View File
@@ -7,7 +7,7 @@ namespace: devsec
name: hardening
# The version of the collection. Must be compatible with semantic versioning
version: 7.0.0
version: 7.1.1
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
@@ -45,7 +45,8 @@ tags:
# collection label 'namespace.name'. The value is a version range
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies: {}
dependencies:
community.crypto: '>=1.0.0'
# The URL of the originating SCM repository
repository: https://github.com/dev-sec/ansible-os-hardening
+1
View File
@@ -1,5 +1,6 @@
molecule[docker]
yamllint
ansible
ansible-lint
docker
flake8
+2 -2
View File
@@ -5,7 +5,7 @@
# This is also the reason why there's ignore_errors: true on the task.
# also see: https://github.com/dev-sec/ansible-os-hardening/issues/219
- name: find files with write-permissions for group
shell: "find -L {{ item }} -perm /go+w -type f" # noqa 305
shell: "find -L {{ item }} -perm /go+w -type f" # noqa command-instead-of-shell
with_flattened:
- '/usr/local/sbin'
- '/usr/local/bin'
@@ -13,7 +13,7 @@
- '/usr/bin'
- '/sbin'
- '/bin'
- "{{ os_env_extra_user_paths }}" # noqa 104
- "{{ os_env_extra_user_paths }}" # noqa deprecated-bare-vars
register: minimize_access_directories
ignore_errors: true
changed_when: false
+3
View File
@@ -35,6 +35,9 @@ Warning: This role disables root-login on the target server! Please make sure yo
- `ssh_host_key_files`
- Default: `[]`
- Description: Host keys for sshd. If empty ['/etc/ssh/ssh_host_rsa_key', '/etc/ssh/ssh_host_ecdsa_key', '/etc/ssh/ssh_host_ed25519_key'] will be used, as far as supported by the installed sshd version.
- `ssh_host_rsa_key_size`
- Default: `4096`
- Description: Specifies the number of bits in the private host RSA key to create.
- `ssh_host_key_algorithms`
- Default: `[]`
- Description: Host key algorithms that the server offers. If empty the [default list](https://man.openbsd.org/sshd_config#HostKeyAlgorithms) will be used, otherwise overrides the setting with specified list of algorithms.
+3
View File
@@ -36,6 +36,9 @@ ssh_listen_to: ['0.0.0.0'] # sshd
# Host keys to look for when starting sshd.
ssh_host_key_files: [] # sshd
# Host RSA key size in bits
ssh_host_rsa_key_size: 4096 # sshd
# Host certificates to look for when starting sshd.
ssh_host_certificates: [] # sshd
@@ -1,9 +1,9 @@
---
- name: replace default 2048 bits RSA keypair with 4096 bits keypair
openssh_keypair:
- name: replace default 2048 bits RSA keypair
community.crypto.openssh_keypair:
state: present
type: rsa
size: 4096
size: "{{ ssh_host_rsa_key_size }}"
path: "{{ ssh_host_keys_dir }}/ssh_host_rsa_key"
force: false
regenerate: partial_idempotence
+3 -1
View File
@@ -33,7 +33,9 @@
- name: set default for ssh_host_key_files if not supplied
include_tasks: crypto_hostkeys.yml
when: not ssh_host_key_files
when:
- ssh_server_hardening | bool
- not ssh_host_key_files
- name: set default for ssh_macs if not supplied
include_tasks: crypto_macs.yml