Commit graph

1781 commits

Author SHA1 Message Date
Sebastian Gumprich
92afe6e336 use fqn for with_flattened
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-15 11:38:06 +02:00
Sebastian Gumprich
41982c15a8 Revert "add more tests to the os-hardening vm tests"
This reverts commit c05fe8b520.

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-15 09:23:43 +02:00
Sebastian Gumprich
c05fe8b520 add more tests to the os-hardening vm tests
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-15 09:10:47 +02:00
Sebastian Gumprich
26e37cabc5 add more conditionals to when auditd show be hardened
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-15 09:08:26 +02:00
Sebastian Gumprich
862edbbe40
Update roles/os_hardening/tasks/minimize_access.yml 2022-07-14 15:03:34 +02:00
David James
9d6903e7ad Only run harding if /var/log/audit exists
Signed-off-by: GitHub <noreply@github.com>
2022-07-13 17:58:20 +00:00
dev-sec CI
b6f32948ec update galaxy.yml with new version 2022-07-11 21:14:56 +00:00
dev-sec CI
0a25d486a0 update changelog 2022-07-11 19:59:01 +00:00
schurzi
e03e435517
Merge pull request #547 from dev-sec/vm_tests
add VM tests for os_hardening
2022-07-11 21:57:21 +02:00
Martin Schurz
27d091e871 reduce testing on vm
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 16:08:35 +02:00
Martin Schurz
c81ce23ed7 disable ctrl+alt+del for vm tests
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 13:04:14 +02:00
Martin Schurz
72cb97c8d5 remove waivers file from docker test config
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 12:36:48 +02:00
Martin Schurz
edda7075a2 add badge for tests
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 12:17:34 +02:00
Martin Schurz
0f631c1405 add sysctl exclude
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 09:39:52 +02:00
Martin Schurz
5d50b5b130 add sysctl exclude
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 09:32:02 +02:00
Martin Schurz
28baf0d581 add sysctl exclude
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 09:17:44 +02:00
Martin Schurz
4b519e8b13 add sysctl exclude
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 09:13:26 +02:00
Martin Schurz
92dc094022 add sysctl exclude
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-11 09:05:58 +02:00
Martin Schurz
fdc6b333c9 exclude arch
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-10 21:30:45 +02:00
Martin Schurz
1825eba27a exclude opensuse
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-10 21:08:50 +02:00
Martin Schurz
cd45a58683 fix yum gpg-check task
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-10 20:22:39 +02:00
Martin Schurz
730510c2a7 add opensuse and arch
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-10 15:55:08 +02:00
Martin Schurz
fa7f8597d9 fix bug in check for /boot
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-10 13:36:19 +02:00
Martin Schurz
b6b2d45f09 speedup ansible
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 15:43:59 +02:00
Martin Schurz
9cfe1f2b9a also harden /boot
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 15:43:11 +02:00
Martin Schurz
e49eacd8ec icrease ressources for test vm
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 10:42:20 +02:00
Martin Schurz
7535abd882 remove waiver
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 02:22:35 +02:00
Martin Schurz
400e576984 use correct parameter
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 01:47:59 +02:00
Martin Schurz
0eddf2872b setup python
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 01:19:12 +02:00
Martin Schurz
013a554731 force linking
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 00:59:50 +02:00
Martin Schurz
8f3f724380 call correct molecule task
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 00:57:26 +02:00
Martin Schurz
e742330a41 add testing of os_hardning on vm
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-09 00:52:58 +02:00
dev-sec CI
b00b38ece6 update changelog 2022-07-08 16:12:57 +00:00
schurzi
dd919b5cf6
Merge pull request #546 from dev-sec/linting
Linting
2022-07-08 18:10:32 +02:00
Martin Schurz
21df60a71f fix includes
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-08 17:24:07 +02:00
Sebastian Gumprich
73f84ae2a9 fix wrong indentation
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-08 16:04:37 +02:00
Sebastian Gumprich
bf372f8493 rename tasks file and remove redundant 'verify'
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-08 16:04:24 +02:00
Sebastian Gumprich
ef89d52f98 remove duplicate file
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-07 16:22:10 +02:00
Sebastian Gumprich
9b50392d8a fix linting
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-07 16:12:06 +02:00
Sebastian Gumprich
215c50709b tempt 2022-07-07 15:34:28 +02:00
Sebastian Gumprich
a8fdf2de0a fix linting errors
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-07 14:59:39 +02:00
dev-sec CI
3528fe9f6d update changelog 2022-07-07 10:08:44 +00:00
Martin Schurz
02b9a20fe7 fix release action
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-07 12:06:34 +02:00
Martin Schurz
f627d2fbfd fix release action
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-07-07 11:27:51 +02:00
rndmh3ro
e28e09cd0e Prettified Code! 2022-07-07 07:02:50 +00:00
balu
488ff6a7c3
Harden mountpoints (#531)
* 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>
2022-07-07 09:02:25 +02:00
dev-sec CI
0251172cd1 update galaxy.yml with new version 2022-06-29 14:02:54 +00:00
dev-sec CI
9b27a6a0fc update changelog 2022-06-29 13:57:35 +00:00
Martin Schurz
b32ee28a89 use correct version for github-actions-x/commit
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-06-29 15:55:13 +02:00
Martin Schurz
0c8cbb2185 update GitHub action for checkout
there was a new feature introduced to git, that prevents some of our
actions to run. The updated action handles this properly.

https://github.com/actions/checkout/issues/760

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-06-29 15:34:39 +02:00