Skip to main content
RunBook Academy

← All checklists in Linux

Before deploymentlinux-security

Checklist: Security baseline pre-deploy

22 items ·17 critical ·5 warn ·0 info

Use this checklist before promoting any host to production. Any Critical failure must be resolved before deploy.

How to use this checklist

Run every command on the target host itself, as root. Most of them read files or kernel state that an unprivileged user cannot see, and a check that returns nothing because it was denied looks identical to a check that returns nothing because the host is clean.

Several commands are written so that no output is the pass condition — the world-readable secrets search and the enabled-services grep print only what is wrong. Do not treat silence as a broken command; treat it as the answer. The firewall check is the other shape: it prints one line per base chain, and you are looking for a policy that is not drop. Neither shape asks you to read a full ruleset and decide, which is deliberate — that is the review that passes whatever you expected to find.

openscap-scan is the only item that writes to disk (a report file). Run it somewhere you are content to leave the HTML behind, and attach the report to the deploy ticket rather than recording a bare pass.

Anything you cannot satisfy becomes an exception under exceptions-documented, with an owner and an expiry date. A Critical item is not made acceptable by writing it down — the exception record is how the gap stays visible until it is closed, not how it stops counting.

Verify SSH from the effective configuration, never from the file

sshd -T prints the global block only. Overrides inside Match are invisible until you supply the connection attributes to match against, with -C:

$ sudo sshd -T -C user=root,host=$(hostname -f),addr=10.0.0.1 \
    | grep -iE '^(permitrootlogin|passwordauthentication)'

Run that once per source network you actually accept SSH from, plus once for user=root. Any answer other than no on either keyword is a Critical failure, even if the global block is clean.

Sign-off

  • Operator: _________________ Date: ___________
  • Reviewer: ________________ Date: ___________

Critical17 items

  1. sysctl kernel.randomize_va_space net.ipv4.tcp_syncookies
  2. findmnt /tmp
  3. findmnt /dev/shm
  4. sudo sshd -T | grep -i "^passwordauthentication"
  5. sudo sshd -T | grep -i "^permitrootlogin"
  6. sudo sshd -T | grep -iE "^(ciphers|kexalgorithms|macs|hostkeyalgorithms|pubkeyacceptedalgorithms)"
  7. sudo sshd -T -C user=root,host=$(hostname -f),addr=10.0.0.1 | grep -iE "^(permitrootlogin|passwordauthentication)"
  8. grep -i "^include" /etc/ssh/sshd_config; ls -l /etc/ssh/sshd_config.d/
  9. sudo sshd -t
  10. sestatus; aa-status
  11. sudo nft -j list ruleset | jq -r '.nftables[].chain | select(.type=="filter") | "\(.hook)\t\(.policy)"'
  12. chronyc tracking; timedatectl status
  13. systemctl is-active auditd; sudo auditctl -l | head
  14. sudo passwd -S root
  15. find / -name "id_*" -perm /o+rwx 2>/dev/null; find / -name "shadow*" -perm /o+r 2>/dev/null
  16. apt list --upgradable 2>/dev/null | head; dnf check-update --security
  17. getent passwd breakglass

Warning5 items

  1. grep pwquality /etc/pam.d/common-password
  2. grep faillock /etc/pam.d/
  3. systemctl list-unit-files --state=enabled | grep -E "avahi|bluetooth|cups"
  4. oscap xccdf eval --profile cis_level1_server --report scan.html /usr/share/xml/scap/content/ssg-*.xml