Commit graph

198 commits

Author SHA1 Message Date
dev-sec CI
8d336bcdfa update os_hardening readme 2024-10-22 07:18:45 +00:00
Martin Schurz
f70a74f99f Add variable to set name_format for auditd
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2024-10-22 08:46:23 +02:00
rndmh3ro
8619b26b75 Prettified Code! 2024-10-13 19:42:40 +00:00
dev-sec CI
08dfeedbc0 update os_hardening readme 2024-10-13 18:15:50 +00:00
rndmh3ro
cfd4536868 Prettified Code! 2024-10-13 10:35:08 +00:00
dev-sec CI
ba1991b4c1 update os_hardening readme 2024-10-10 11:39:00 +00:00
rndmh3ro
d6d2624e4d Prettified Code! 2024-10-09 12:40:26 +00:00
Sebastian Gumprich
62947a6ea2
fix(docs): add 'become: true' to example playbooks. fix #787 (#804)
Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2024-10-09 14:40:08 +02:00
schurzi
437546f4a9 Prettified Code! 2024-10-05 07:48:38 +00:00
dev-sec CI
5ef0c42d64 update os_hardening readme 2024-10-04 13:22:42 +00:00
Martin Schurz
2e3d5e916b Remove unused files and variables
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2024-10-04 13:29:16 +02:00
dev-sec CI
c5935d38e5 update os_hardening readme 2024-08-06 11:11:58 +00:00
schurzi
69ab9e47ad
Update Debian compatibility (#784)
* Update Ubuntu compatability

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* reload systemd when disabling ssh socket

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* manage systemd files

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Create privsep directory for Debian

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Use working Ubuntu 24.04 image for vm tests

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Remove deprecated Debian 10

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

---------

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2024-08-06 13:11:32 +02:00
schurzi
2ff44f2145 Prettified Code! 2024-07-28 11:45:51 +00:00
Martin Schurz
f23d5d8eaf Remove deprecated rebuild of initrd
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2024-07-28 13:17:49 +02:00
dev-sec CI
c068979b91 update os_hardening readme 2024-06-24 08:41:24 +00:00
rndmh3ro
26ecb3f5ea Prettified Code! 2024-06-04 08:16:33 +00:00
Sebastian Gumprich
85aa1b22b3
do not force type of ssh_gateway_ports (#765)
* do not force type of gatewayports-var

this way it can be a bool or a string. we also now test for it

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

* replace yum with dnf

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2024-05-31 12:20:00 +02:00
dev-sec CI
eb972f63f7 update os_hardening readme 2024-05-31 09:42:33 +00:00
Sebastian Gumprich
296f46cc80
centos7 is eol, remove it (#767)
* centos7 is eol, remove it

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

* change workflow to update readmes when meta/main.yml is changed

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

* remove mention of centos 7 from readme

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2024-05-31 11:25:01 +02:00
Sebastian Gumprich
f3a1fcc16a fix spelling
Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2024-05-30 15:01:33 +02:00
schurzi
72eb74a85f Prettified Code! 2024-01-15 13:51:25 +00:00
Sebastian Gumprich
e5cc9bbf43 restructure readme to move known problems up top
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@telekom.de>
2024-01-12 09:30:48 +01:00
Martin Schurz
422fb940a9 manually fix remaining problems
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-12-06 15:27:21 +01:00
Martin Schurz
54f9ef42a1 don't try to restart audit in check mode
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-22 00:45:38 +01:00
Martin Schurz
25acb76c05 reload systemd after installation
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-21 23:59:22 +01:00
Martin Schurz
0f6b8e4a3a use full service name for handler
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-21 23:04:41 +01:00
Martin Schurz
20dd04c9cb split notify, add tmp options for arch
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-21 21:58:58 +01:00
Martin Schurz
60d10811d4 add separate handlers for audit restart
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-21 21:45:05 +01:00
Aki Kanellis
a15159d072 Make disabling unused filesystems idempotent
The `os_unused_filesystems` was lacking sorting, making the task not
idempotent. This was especially apparent and random in Molecule tests
when this collection was added as a dependency.

Signed-off-by: Aki Kanellis <hello@akikanellis.com>
2023-11-19 19:57:31 +00:00
dev-sec CI
1b69855d51 update os_hardening readme 2023-11-16 14:20:47 +00:00
schurzi
0371a2690b Prettified Code! 2023-11-16 11:35:10 +00:00
Martin Schurz
adda83572a fix mixup, add custom test badge
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-16 12:10:41 +01:00
schurzi
3d98cbf67b
add testing and support for current versions of Fedora and FreeBSD (#709)
* add testing and support for current versions of Fedora and FreeBSD

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* add waivers for FreeBSD

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* use original fedora images

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* also harden /home mount

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* also harden /tmp mount

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* test mock efi directory

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* remove mock

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* umount efi

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* add /tmp to special mountpoints

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* set options for /tmp mount

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* create /tmp mount

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* create /tmp mount and mount it ...

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* make fewer changes to default test run

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* use correct Ansible var

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

---------

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-16 09:14:03 +01:00
schurzi
da017fa880
Gather facts when os_hardening role is executed with tags (#708)
* Gather facts when os_hardening role is executed with tags

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* better when condition

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

---------

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-11-01 15:54:52 +01:00
dev-sec CI
ac7ef8aae6 update os_hardening readme 2023-10-26 08:43:45 +00:00
rndmh3ro
a08a057f7b Prettified Code! 2023-10-23 10:24:09 +00:00
Sebastian Gumprich
787ac9bd54
fix some wrong defaults and types in the readmes (#703)
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@telekom.de>
2023-10-23 12:23:49 +02:00
Nejc Habjan
35d87aa678
Fix typo in login.defs.j2
Signed-off-by: Nejc Habjan <nejc.habjan@siemens.com>
2023-10-08 14:15:16 +02:00
rndmh3ro
965c9326d0 Prettified Code! 2023-08-24 13:22:18 +00:00
Sebastian Gumprich
9c5b619149
fix descrptions in readme (#693)
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@telekom.de>
2023-08-24 15:21:57 +02:00
Thibault Soubiran
f602bc621a
feat: customize user paths default. Resolves: #689 (#692)
Signed-off-by: Thibault Soubiran <thibault.soubiran@protonmail.com>
2023-08-24 14:02:23 +02:00
rndmh3ro
c1a0bcbe9d Prettified Code! 2023-08-07 12:31:26 +00:00
Sebastian Gumprich
f295397611
add role argument spec for os, ssh, mysql (#687)
* add role argument spec for os, ssh, mysql

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* add role argument spec for os, ssh, mysql

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* remove variable in variable as it cannot be used in argument spec

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* fix wrong syntax

* fix spelling errors

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* cannot use vars before arg-spec validation

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* yamllint the arg-spec

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* add back variable

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* remove redundant setting in tests

* fix descriptions in mysql hardening to betterreflect what they do

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* remove duplicate empty line

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* set correct defaults on to ssl options

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* remove left-over hidepid argument spec

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* remove license and author infos, this lives in the collection readme

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* fix styling

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* update some descriptions and sort them in the readme

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

* some more linting

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>

---------

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
Co-authored-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-08-07 14:30:59 +02:00
Dennis Lerch
6bcdb253ec
auditd: add possibility to override config template (#685)
* make template overrideable

by referencing the auditd.conf.j2 template, a custom template can be provided to the role.

Signed-off-by: Dennis Lerch <dennis.lerch@mercedes-benz.com>

* extend auditd config

make freq and log_file configurable
implement write_logs with it's default value in order to be able to disable log writing

Signed-off-by: Dennis Lerch <dennis.lerch@mercedes-benz.com>

* Extend README.md documentation by new variables

reorder `os_auditd_log_format` to keep sequence from defaults

Signed-off-by: Dennis Lerch <dennis.lerch@mercedes-benz.com>

---------

Signed-off-by: Dennis Lerch <dennis.lerch@mercedes-benz.com>
2023-07-24 11:34:47 +02:00
Sebastian Gumprich
7e6a715692
setting gets ignored (#680)
see: https://github.com/authselect/authselect/issues/223

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-05-26 14:10:49 +02:00
junicast
f3337f33b3
Add oddjob mkhomedir option rhel pam (#675)
* added support for oddjob mkhomedir via optional var

* optimized conditional

* added variable description

Signed-off-by: Jochen Demmer <jochen.demmer@noris.de>

* added support for oddjob mkhomedir via optional var

Signed-off-by: Jochen Demmer <jochen.demmer@noris.de>

* optimized conditional

Signed-off-by: Jochen Demmer <jochen.demmer@noris.de>

* added variable description

Signed-off-by: Jochen Demmer <jochen.demmer@noris.de>

---------

Signed-off-by: Jochen Demmer <jochen.demmer@noris.de>
Co-authored-by: Jochen Demmer <jochen.demmer@noris.de>
2023-05-23 11:19:40 +02:00
schurzi
1cce7bca9a
Merge pull request #662 from dev-sec/codespell
add spellchecking with codespell
2023-04-17 09:47:53 +02:00
Martin Schurz
7259d6b5fd fix spelling errors
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-04-14 23:51:53 +02:00
Martin Schurz
eb47f4dce0 Merge branch 'master' into min_ansible_ver 2023-04-12 22:22:36 +02:00