T09 · Insecure Skill Coding Practices
- Location
scripts/main.py:274- Finding
SSH Command-Line Option Injection Through an Unvalidated Hostname
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a legitimate SSH config manager, but it edits sensitive SSH settings and tests connections in ways that need careful review before installation.
Install only if you are comfortable letting this skill read and modify SSH client configuration. Review changes before applying them, keep your own backup of ~/.ssh/config, avoid testing hosts from untrusted config files, and be aware that malformed entries could disrupt SSH access or change connection behavior.
scripts/main.py:274SSH Command-Line Option Injection Through an Unvalidated Hostname
scripts/main.py:25SSH Configuration Backups and New Configuration Files Are Created Without Enforced Restrictive Permissions
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Referenced artifact was not completely inspected
python3 scripts/main.py list
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
--hostname server.example.com
--user ec2-user
--port 2222
--identity ~/.ssh/id_rsa
--tag "aws,production"
--description "Production web server"
The skill advertises capabilities to read and write files and invoke shell commands, but it does not declare any explicit tool scope or permission boundaries. For a tool that edits ~/.ssh/config and tests SSH connections, the absence of scoped permissions increases the chance of overbroad file modification or command execution beyond what a user would reasonably expect.
Describing add/remove/edit operations on ~/.ssh/config without an explicit caution underplays the sensitivity of SSH client configuration. Even non-malicious edits can lock users out of hosts, redirect traffic via attacker-controlled options such as ProxyCommand, or weaken expected connection behavior if changes are applied carelessly.
The documented generate --output ~/.ssh/config workflow can overwrite a critical authentication configuration file without a prominent warning about disruption risk. A malformed or unintended overwrite of ~/.ssh/config can break access to infrastructure, alter routing through bastions/proxies, or cause users to connect with unsafe defaults.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
start_time = time.time()
result = subprocess.run(
ssh_command,
capture_output=True,
text=True,
This markdown file describes operations that alter the user's SSH configuration, including adding, editing, and removing hosts. Although it mentions backups before changes, it does not clearly warn users that the tool modifies a sensitive local config file whose mistakes could disrupt SSH access or connectivity.
No suspicious patterns detected.