2020-11-07 20:19:43 +00:00
# Ansible Collection - devsec.hardening
2015-05-04 21:37:22 +00:00
2023-11-16 10:30:38 +00:00
[![devsec.os_hardening ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/os_hardening.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/os_hardening.yml)
[![devsec.os_hardening VM ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/os_hardening_vm.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/os_hardening_vm.yml)
[![devsec.ssh_hardening ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening.yml)
[![devsec.ssh_hardening BSD ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening_bsd.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening_bsd.yml)
2023-11-16 11:10:41 +00:00
[![devsec.ssh_hardening with custom tests ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening_custom_tests.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/ssh_hardening_custom_tests.yml)
2023-11-16 10:30:38 +00:00
[![devsec.nginx_hardening ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/nginx_hardening.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/nginx_hardening.yml)
[![devsec.mysql_hardening ](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/mysql_hardening.yml/badge.svg )](https://github.com/dev-sec/ansible-collection-hardening/actions/workflows/mysql_hardening.yml)
2015-05-04 21:37:22 +00:00
## Description
2020-11-11 20:54:31 +00:00
This collection provides battle tested hardening for:
2015-06-23 18:20:06 +00:00
2020-11-08 10:20:25 +00:00
- Linux operating systems:
2024-05-31 09:25:01 +00:00
- CentOS 8/9
2023-08-04 10:59:40 +00:00
- Rocky Linux 8/9
- Debian 10/11/12
2022-08-16 15:21:06 +00:00
- Ubuntu 18.04/20.04/22.04
2021-01-08 19:45:50 +00:00
- Amazon Linux (some roles supported)
2020-11-08 10:20:25 +00:00
- Arch Linux (some roles supported)
2023-06-12 12:18:32 +00:00
- Fedora 37/38 (some roles supported)
2021-01-08 19:45:50 +00:00
- Suse Tumbleweed (some roles supported)
2020-11-08 10:20:25 +00:00
- MySQL
- MariaDB >= 5.5.65, >= 10.1.45, >= 10.3.17
2021-01-08 19:45:50 +00:00
- MySQL >= 5.7.31, >= 8.0.3
- Nginx 1.0.16 or later
- OpenSSH 5.3 and later
2015-05-28 20:52:10 +00:00
2020-11-07 20:19:43 +00:00
The hardening is intended to be compliant with the Inspec DevSec Baselines:
2015-05-28 20:52:10 +00:00
2022-05-04 11:44:52 +00:00
- < https: // github . com / dev-sec / linux-baseline >
- < https: // github . com / dev-sec / mysql-baseline >
- < https: // github . com / dev-sec / nginx-baseline >
- < https: // github . com / dev-sec / ssh-baseline >
2015-05-04 21:37:22 +00:00
2022-05-04 11:44:52 +00:00
## Looking for the old roles?
2020-11-11 19:44:29 +00:00
2022-05-04 11:44:52 +00:00
The roles are now part of the hardening-collection.
We have kept the old releases of the `os-hardening` role in this repository, so you can find the them by exploring older tags.
The last release of the standalone role was [6.2.0 ](https://github.com/dev-sec/ansible-collection-hardening/tree/6.2.0 ).
2022-08-22 10:39:21 +00:00
The other roles are in separate archives repositories:
2022-05-04 11:44:52 +00:00
- [apache_hardening ](https://github.com/dev-sec/ansible-apache-hardening )
- [mysql_hardening ](https://github.com/dev-sec/ansible-mysql-hardening )
- [nginx_hardening ](https://github.com/dev-sec/ansible-nginx-hardening )
- [ssh_hardening ](https://github.com/dev-sec/ansible-ssh-hardening )
- [windows_hardening ](https://github.com/dev-sec/ansible-windows-hardening )
2020-11-11 19:44:29 +00:00
2020-12-26 20:27:19 +00:00
## Minimum required Ansible-version
2017-08-04 19:12:26 +00:00
2021-02-05 19:37:49 +00:00
- Ansible >= 2.9.10
2017-08-04 19:12:26 +00:00
2020-11-07 20:19:43 +00:00
## Included content
2017-08-04 19:12:26 +00:00
2020-11-08 10:20:25 +00:00
- [os_hardening ](roles/os_hardening/ )
- [mysql_hardening ](roles/mysql_hardening/ )
- [nginx_hardening ](roles/nginx_hardening/ )
2021-01-08 19:45:50 +00:00
- [ssh_hardening ](roles/ssh_hardening/ )
2017-10-30 18:00:47 +00:00
2020-11-07 20:19:43 +00:00
In progress, not working:
2019-04-29 14:48:52 +00:00
2020-11-08 10:20:25 +00:00
- [apache_hardening ](roles/apache_hardening/ )
- [windows_hardening ](roles/windows_hardening/ )
2019-04-29 14:48:52 +00:00
2021-02-25 06:57:55 +00:00
## Installation
Install the collection via ansible-galaxy:
`ansible-galaxy collection install devsec.hardening`
2020-11-07 20:19:43 +00:00
## Using this collection
2019-04-29 14:48:52 +00:00
2020-11-07 20:19:43 +00:00
Please refer to the examples in the readmes of the role.
2015-05-04 21:37:22 +00:00
2020-11-07 20:19:43 +00:00
See [Ansible Using collections ](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html ) for more details.
2016-01-31 14:31:21 +00:00
2020-11-07 20:19:43 +00:00
## Contributing to this collection
2016-01-31 14:31:21 +00:00
2020-11-07 20:19:43 +00:00
See the [contributor guideline ](CONTRIBUTING.md ).
2018-10-11 18:38:02 +00:00
2020-11-07 20:19:43 +00:00
## Release notes
2016-01-31 14:31:21 +00:00
2020-11-07 20:19:43 +00:00
See the [changelog ](https://github.com/dev-sec/ansible-os-hardening/tree/master/CHANGELOG.md ).
2016-01-31 14:31:21 +00:00
2020-11-07 20:19:43 +00:00
## Roadmap
2020-01-25 16:08:00 +00:00
2020-11-07 20:19:43 +00:00
Todos:
2020-11-08 10:20:25 +00:00
2022-08-22 09:25:08 +00:00
- Work on [apache_hardening ](roles/apache_hardening/ ) and [windows_hardening ](roles/windows_hardening/ )
- Add support for more operating systems
2020-01-25 16:08:00 +00:00
2020-11-07 20:19:43 +00:00
## More information
2020-01-25 16:08:00 +00:00
2020-11-07 20:19:43 +00:00
General information:
2016-05-22 13:31:21 +00:00
2020-11-07 20:19:43 +00:00
- [Ansible Collection overview ](https://github.com/ansible-collections/overview )
- [Ansible User guide ](https://docs.ansible.com/ansible/latest/user_guide/index.html )
- [Ansible Developer guide ](https://docs.ansible.com/ansible/latest/dev_guide/index.html )
- [Ansible Collections Checklist ](https://github.com/ansible-collections/overview/blob/master/collection_requirements.rst )
- [Ansible Community code of conduct ](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html )
- [The Bullhorn (the Ansible Contributor newsletter) ](https://us19.campaign-archive.com/home/?u=56d874e027110e35dea0e03c1&id=d6635f5420 )
- [Changes impacting Contributors ](https://github.com/ansible-collections/overview/issues/45 )
2015-05-04 21:37:22 +00:00
2020-11-07 20:19:43 +00:00
## Licensing
2015-05-04 21:37:22 +00:00
2020-11-07 20:19:43 +00:00
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
2016-05-22 13:31:21 +00:00
2022-05-04 11:44:52 +00:00
< http: / / www . apache . org / licenses / LICENSE-2 . 0 >
2015-05-04 21:37:22 +00:00
2020-11-07 20:19:43 +00:00
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.