#1098268 sshguard needlessly runs as root by default

Package:
sshguard
Source:
sshguard
Description:
Protects from brute force attacks against ssh
Submitter:
Lee Garrett
Date:
2025-02-18 14:42:02 UTC
Severity:
normal
#1098268#5
Date:
2025-02-18 14:38:34 UTC
From:
To:
Hi,

a default install of sshguard runs as root by default, which has certain
security implications we should avoid. Most action don't require root:

logreading:
Reading relevant files in /var/log/ or running journalctl requires only an
unprivileged user in the adm group.

logparsing:
requires no permissions at all.

sshg-blocker:
requires no permissions at all.

calling the firewall backend:
iptables/nftables will require root, but firewalld can for example be called via
dbus.

Consider selectively dropping privs along the pipeline and packaging it as such
by default.

Greets,
Lee