T09 · Insecure Skill Coding Practices
- Location
scripts/host_manager.py:31- Finding
Remote SSH passwords are stored and disclosed in plaintext
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This remote terminal skill does what it claims, but it handles powerful SSH access and has credential-storage and safety-control gaps that users should review carefully.
Install only if you are comfortable giving the skill authority to run SSH commands on your servers. Prefer SSH keys with an agent, avoid the password options, do not store passwords in hosts.json, review host files before use, and be especially cautious with parallel execution because it can affect many machines at once.
scripts/host_manager.py:31Remote SSH passwords are stored and disclosed in plaintext
scripts/ssh_exec.py:104Unvalidated SSH destinations permit local command execution through option injection
scripts/parallel_exec.py:77Parallel executor bypasses dangerous-command confirmation controls
The description understates sensitive behaviors such as local host-configuration storage, potential credential handling, and use of insecure remote access methods. This mismatch can mislead users and reviewers about the real trust boundary, causing them to invoke a skill that handles secrets or insecure connectivity without informed consent.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- `rm -rf`, `rm -r`, `del`, `erase`
- `shutdown`, `reboot`, `poweroff`, `halt`
- `mkfs`, `fdisk`, `parted`, `dd`
- `chmod 777`, `chown -R`
- `> /dev/`, `truncate`
- `kill -9`, `pkill`, `killall`
- `iptables`, `ufw`, `firewall-cmd`
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- `DROP DATABASE`, `DELETE FROM`, `TRUNCATE`
**Confirmation format:**
> ⚠️ **Dangerous command detected**: `rm -rf /var/log/*`
> This will permanently delete files. Proceed? (yes/no)
### Command Blacklist
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- `DROP DATABASE`, `DELETE FROM`, `TRUNCATE`
**Confirmation format:**
> ⚠️ **Dangerous command detected**: `rm -rf /var/log/*`
> This will permanently delete files. Proceed? (yes/no)
### Command Blacklist
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- `DROP DATABASE`, `DELETE FROM`, `TRUNCATE`
**Confirmation format:**
> ⚠️ **Dangerous command detected**: `rm -rf /var/log/*`
> This will permanently delete files. Proceed? (yes/no)
### Command Blacklist
Listing rm -rf / as overrideable indicates the safety model permits execution of irreversible system-destruction commands after a conversational exception. In a skill designed for remote shell access, that creates a severe risk of accidental or manipulated destructive execution on important hosts.
### Command Blacklist
These commands are blocked by default and require explicit user override:
- `rm -rf /` (entire filesystem)
- `mkfs` on mounted drives
- `dd` to primary disk
- Any command piping to `/dev/sda` or similar
Listing rm -rf / as overrideable indicates the safety model permits execution of irreversible system-destruction commands after a conversational exception. In a skill designed for remote shell access, that creates a severe risk of accidental or manipulated destructive execution on important hosts.
### Command Blacklist
These commands are blocked by default and require explicit user override:
- `rm -rf /` (entire filesystem)
- `mkfs` on mounted drives
- `dd` to primary disk
- Any command piping to `/dev/sda` or similar
The skill proposes storing host information, including authentication method and key path, in a local memory file. In this context, centralized local storage of connection metadata increases the attack surface for credential discovery and may encourage future addition of plaintext secrets despite the description not adequately warning about that risk.
"host": "192.168.1.100",
"user": "admin",
"method": "ssh-key",
"key": "~/.ssh/id_rsa",
"tags": ["web", "critical"]
},
"staging": {
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Strong passphrase (use a password manager)
ssh-keygen -p -f ~/.ssh/id_ed25519
# Correct permissions
chmod 700 ~/.ssh
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-add ~/.ssh/id_ed25519
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-add ~/.ssh/id_ed25519
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check known hosts
cat ~/.ssh/known_hosts
# Remove old/compromised key
ssh-keygen -R hostname
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Global defaults
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
ServerAliveInterval 60
ServerAliveCountMax 3
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Examples:
ssh_exec.py production "uptime"
ssh_exec.py 192.168.1.100 "docker ps" --user admin --key ~/.ssh/id_rsa
ssh_exec.py staging "systemctl status nginx" --log
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Examples:
ssh_exec.py production "uptime"
ssh_exec.py 192.168.1.100 "docker ps" --user admin --key ~/.ssh/id_rsa
ssh_exec.py staging "systemctl status nginx" --log
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Examples:
ssh_exec.py production "uptime"
ssh_exec.py 192.168.1.100 "docker ps" --user admin --key ~/.ssh/id_rsa
ssh_exec.py staging "systemctl status nginx" --log
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Examples:
ssh_exec.py production "uptime"
ssh_exec.py 192.168.1.100 "docker ps" --user admin --key ~/.ssh/id_rsa
ssh_exec.py staging "systemctl status nginx" --log
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Examples:
ssh_exec.py production "uptime"
ssh_exec.py 192.168.1.100 "docker ps" --user admin --key ~/.ssh/id_rsa
ssh_exec.py staging "systemctl status nginx" --log
"""
No suspicious patterns detected.