T09 · Insecure Skill Coding Practices
- Location
SKILL.md:36- Finding
SSH Agent Forwarding Is Enabled Without Sufficient Trust-Boundary Restrictions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a documentation-only SSH skill, but it includes copyable SSH examples that weaken host verification and broadly expose forwarded agents without enough guardrails.
Review this skill before installing if users may copy commands directly. The main risks are insecure SSH habits: do not disable host-key checking except in tightly controlled throwaway cases, avoid agent forwarding on wildcard or untrusted hosts, dry-run rsync before using --delete, and validate sshd_config before restarting SSH.
SKILL.md:36SSH Agent Forwarding Is Enabled Without Sufficient Trust-Boundary Restrictions
SKILL.md:204Examples Disable SSH Host-Key Verification
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh -v user@hostname
# Connect with specific key
ssh -i ~/.ssh/id_rsa user@hostname
# Connect and run command
ssh user@hostname 'ls -la'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-copy-id -i ~/.ssh/id_rsa.pub user@hostname
# Manual key copy
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> ~/.ssh/authorized_keys'
# Check key fingerprint
ssh-keygen -lf ~/.ssh/id_rsa.pub
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
ssh-copy-id -i ~/.ssh/id_rsa.pub user@hostname
# Manual key copy
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> ~/.ssh/authorized_keys'
# Check key fingerprint
ssh-keygen -lf ~/.ssh/id_rsa.pub
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).
rsync -avz --progress /local/dir/ user@hostname:/remote/dir/
# Sync with delete (mirror)
rsync -avz --delete /local/dir/ user@hostname:/remote/dir/
# Exclude patterns
rsync -avz --exclude '*.log' --exclude 'node_modules/' \
The skill explicitly documents disabling StrictHostKeyChecking and later repeats a 'not recommended' variant, but it does not clearly explain that this bypasses server identity verification and enables man-in-the-middle attacks. In an SSH-focused skill, normalization of this flag is especially risky because users may copy-paste it during first connection or troubleshooting.
The guide instructs restarting sshd after configuration changes without warning that an incorrect sshd_config can terminate remote administrative access or lock the operator out. In a remote access skill, this operational footgun can cause outage or loss of access to managed systems.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
AllowUsers user1 user2
sudo systemctl restart sshd
### Connection security
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
AllowUsers user1 user2
sudo systemctl restart sshd
### Connection security
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
AllowUsers user1 user2
sudo systemctl restart sshd
### Connection security
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ssh -T user@hostname
ls -la ~/.ssh/
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Fix permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Fix permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Fix permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
# Clear known_hosts entry
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Fix permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
# Clear known_hosts entry
No suspicious patterns detected.