[ ] TODO: How to handle OS specific tags (e.g. slackware & debian)? Do we tag every task that applies to that particular OS or tag only the tasks that apply only to that OS? E.g.: Should the user run ansible-playbook --tags slackware or ansible-playbook --skip-tags centos,debian? Or have a separate common/generic that applies to all (e.g. ansible-playbook --tags common,slackware)?
What else?
[x] TODO: Rename sysstat.yml to accounting.yml as it contains process accounting also (or maybe services-accounting.yml?)
Use handlers
sysctl
rkhunter --propupd
update-ca-certificates
AIDE
pam-auth-update
Use files/ & templates/ instead of newconfs/
Rename project from harden.sh to harden.yml :D
Easy (or important) ones
[x] modprobe.d
[x] Install security related Debian packages
[x] Install Lynis? (Debian)
[ ] auditd
/etc/default/grub
[x] Disable core dumps
[x] sysstat
/etc/default/sysstat
[ ] PAM
useradd -D -f (see f53a7fe468bf5f428661ec96ae363df6193711fe)
users
group (login.access etc.)ansible-lint
ignore_errors: yes
packages
pam
filesystem
and/orpermissions
configuration
(maybe also include service state changes?)crypto
and/orpki
network
and/orfirewall
authentication
,authorization
&accounting
services
services
) but others could be used to limit the amount of hardening (e.g.pam
orpki
)aide
,ssh
,lynis
,chkrootkit
,rkhunter
,audit
,sysstat
,ssh
,debsecan
,debsums
&clamav
)kernel
passwords
? (includefaillock
etc.?)logging
cron
?accounts
(user management)banners
slackware
&debian
)? Do we tag every task that applies to that particular OS or tag only the tasks that apply only to that OS? E.g.: Should the user runansible-playbook --tags slackware
oransible-playbook --skip-tags centos,debian
? Or have a separatecommon
/generic
that applies to all (e.g.ansible-playbook --tags common,slackware
)?sysstat.yml
toaccounting.yml
as it contains process accounting also (or maybeservices-accounting.yml
?)sysctl
rkhunter --propupd
update-ca-certificates
pam-auth-update
files/
&templates/
instead ofnewconfs/
Easy (or important) ones
modprobe.d
/etc/default/grub
sysstat
/etc/default/sysstat
(see f53a7fe468bf5f428661ec96ae363df6193711fe)useradd -D -f
fstab
/etc/ftpusers
/etc/shells
Not easy, but I'll list this here anyway:
Services / app specific
ssh_config
alsoFingerprintHash
Network
Not-so-easy ones
TODO: list here the stuff we will want to do with scripts and not
.yml
Modifying configuration files
regexp
doesn't match Ansible just says "ok: [localhost] => {"changed": false, "msg": ""}
"replace
vs.lineinfile
https://stackoverflow.com/questions/44922281/which-module-to-use-to-edit-files-ansible/44923355#44923355:
Pros