Back to skill

Security audit

ssh_file_manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real remote file manager, but its broad SSH file-changing powers and weak input safeguards make it require careful review before use.

Install only if you trust the operator and the Tailnet environment, and expect the skill to use your existing SSH access to read, overwrite, chmod, copy, move, and recursively delete remote files. Avoid using it with untrusted hostnames, paths, modes, or prompts until host/path validation, destructive-operation guardrails, and safer remote command construction are added.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ssh_file_manager.py:14
Finding

Local SSH Option Injection Through the Host Argument

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ssh_file_manager.py:67
Finding

Remote Python Code Injection Through List and Stat Paths

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/ssh_file_manager.py:168
Finding

Remote Shell Command Injection Through Chmod Mode

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/ssh_file_manager.py:14
Finding

Automatic Trust of Unknown SSH Host Keys

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior promises broad remote file-management functionality, while the analysis indicates the actual implementation may only perform SSH reachability checks and lacks the claimed controls and operations. This mismatch is dangerous because operators may trust the skill to safely manage remote files or enforce safeguards when it does not, leading to misuse, unsafe fallbacks, or invocation of unintended shell behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The delete action issues rm -rf against an arbitrary remote path with no confirmation prompt, no dry-run mode, no path restrictions, and no safeguards against dangerous targets such as / or critical system directories. In a remote file-management skill, this materially increases the chance of catastrophic accidental deletion or misuse through prompt manipulation or incorrect user input.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill exposes shell-driven remote file management behavior through documented use of ssh/scp/sftp helper scripts, but it declares no explicit tool scope or permission boundaries. That makes the effective capability broader and less governable, increasing the risk of unauthorized file access, remote modification, or command execution through an over-privileged skill runtime.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/ssh_file_manager.py (reported line 24)May include surrounding context.

python
command,
    ]
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, input=stdin)
        return result.returncode, result.stdout, result.stderr
    except subprocess.TimeoutExpired:
        return -1, "", "SSH connection timed out"

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/ssh_file_manager.py (reported line 43)May include surrounding context.

python
dst,
    ]
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
        return result.returncode, result.stdout, result.stderr
    except subprocess.TimeoutExpired:
        return -1, "", "SCP connection timed out"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The write operation unconditionally overwrites or creates a remote file via SCP without warning, backup, existence checks, or an explicit overwrite flag. In this skill's context, where the agent manages files on remote hosts, silent overwrites can destroy important data or alter configuration and operational files with little friction.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/ssh_tunnel.py (reported line 24)May include surrounding context.

python
"echo tailnet-ssh-ok",
    ]
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=10)
        if result.returncode == 0 and "tailnet-ssh-ok" in result.stdout:
            print(json.dumps({
                "success": True,