v0.2.0 — apply-hardening.sh
What's New
apply-hardening.sh — companion remediation script
Run this after the audit to automatically apply the most common fixes:
sudo bash apply-hardening.shApplies 4 hardening steps in order:
- Kernel sysctl — writes
/etc/sysctl.d/99-hardening.confwith ~15 hardened parameters and applies them live viasysctl --system(no reboot needed) - SSH hardening — sets
PermitRootLogin no,MaxAuthTries 3,X11Forwarding no; validates withsshd -tbefore restarting - Password & lockout policy —
minlen = 14(pwquality),deny = 5(faillock) - Unnecessary services — disables
cups,cups-browsed,avahi-daemon,bluetooth
Safe to re-run (idempotent). Creates timestamped backups before every edit.
ShellCheck
Both scripts verified clean — zero warnings across vulnScan.sh and apply-hardening.sh.