488ff6a7c3
* first testing with tasks and variables Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * update variables for dir options Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * updated permissions and defaults Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * fix home dir permissions Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * updated tasks with useful variables Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * reorder tasks. first remount, then manage fstab and fix permissions on directories. Renaming task names with mountpoints (slashes) Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * shorten tasks with list items Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * change defaults for /boot directory, because its a bad behaviour, if ansible changes boot entries with a default value Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * Update documentation for new parameters to manage mountpoints Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * Update roles/os_hardening/tasks/minimize_access.yml Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * Update roles/os_hardening/tasks/minimize_access.yml Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * Fix state on every new task Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * loop instead of list Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * testing remount with register Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * add remounts with loop over all changed folders Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * testing and solving trouble with variable names Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * optimize default permissions for var-log-audit Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * optimize default permissions for var-log-audit Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * change to new optimizied permissions of var-log-audit Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * fix some defaults in fstab to configure as mounted Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> * add stat and check, if boot folder exists Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> Co-authored-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com> Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> |
||
---|---|---|
.github | ||
meta | ||
molecule | ||
roles | ||
.ansible-lint | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.prettierignore | ||
.yamllint | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
galaxy.yml | ||
LICENSE | ||
OS_HARDENING_CHANGELOG.md | ||
README.md | ||
requirements.txt |
Ansible Collection - devsec.hardening
Description
This collection provides battle tested hardening for:
- Linux operating systems:
- CentOS 7/8
- Rocky Linux 8
- Debian 9/10
- Ubuntu 16.04/18.04/20.04
- Amazon Linux (some roles supported)
- Arch Linux (some roles supported)
- Fedora (some roles supported)
- Suse Tumbleweed (some roles supported)
- MySQL
- MariaDB >= 5.5.65, >= 10.1.45, >= 10.3.17
- MySQL >= 5.7.31, >= 8.0.3
- Nginx 1.0.16 or later
- OpenSSH 5.3 and later
The hardening is intended to be compliant with the Inspec DevSec Baselines:
- 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
Looking for the old roles?
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.
The other roles are in separate archives repositories
Minimum required Ansible-version
- Ansible >= 2.9.10
Included content
In progress, not working:
Installation
Install the collection via ansible-galaxy:
ansible-galaxy collection install devsec.hardening
Using this collection
Please refer to the examples in the readmes of the role.
See Ansible Using collections for more details.
Contributing to this collection
See the contributor guideline.
Release notes
See the changelog.
Roadmap
Todos:
- Work on apache_hardening and windows_hardening.
- Add support for more operating systems,
More information
General information:
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Collections Checklist
- Ansible Community code of conduct
- The Bullhorn (the Ansible Contributor newsletter)
- Changes impacting Contributors
Licensing
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
http://www.apache.org/licenses/LICENSE-2.0
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.