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 sudo and modifies critical system security files in /etc/ssh/.
  • [Indirect Prompt Injection] (HIGH): Found in scripts/setup-ssh-hardening.sh.
  • Ingestion points: User-provided $SSH_USER variable.
  • 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 via systemctl.
  • Sanitization: No validation or escaping is performed on $SSH_USER before it is placed in AllowUsers $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 the authorized_keys file 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
Risk Level
HIGH
Analyzed
Feb 16, 2026, 12:45 AM