ssh-hardening
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: HIGHCOMMAND_EXECUTIONCREDENTIALS_UNSAFE
Full Analysis
- [Privilege Escalation] (HIGH): The skill is designed to grant full administrative privileges to new users via
usermod -aG sudoand modifies critical system security files in/etc/ssh/. - [Indirect Prompt Injection] (HIGH): Found in
scripts/setup-ssh-hardening.sh. - Ingestion points: User-provided
$SSH_USERvariable. - Boundary markers: None used in the heredoc generation of the configuration file.
- Capability inventory: Full filesystem write access to
/etc/ssh/sshd_config.d/and service management viasystemctl. - Sanitization: No validation or escaping is performed on
$SSH_USERbefore it is placed inAllowUsers $SSH_USER. A malicious string containing newlines (e.g.,user\nPermitRootLogin yes) could be used to override the intended security posture. - [Data Exposure] (HIGH): The skill explicitly interacts with sensitive directory
~/.ssh/and reads/writes theauthorized_keysfile which manages access control for the server. - [Command Execution] (HIGH): Utilizes powerful system utilities (
adduser,usermod,systemctl) which, if misdirected by the aforementioned injection vulnerability, could be used to compromise the host.
Recommendations
- AI detected serious security threats
Audit Metadata