Back to skill

Security audit

Claw2claw Filetransfer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent file-transfer helper, but it normalizes persistent root SSH access and key installation without enough scoping or warning.

Review this skill carefully before installing. Use a dedicated unprivileged transfer account instead of root, verify exactly what SSH key will be installed and how to revoke it, prefer dry-run before sync, and avoid transferring broad paths like /home, /etc, logs, or database dumps unless the destination is trusted and the data is protected.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (1)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/commands.md:10
Finding

SSH setup defaults to persistent root-level remote access

Content
View full analysis
[user] [port] ``` ```markdown | Argument | Required | Default | Description | |----------|----------|---------|-------------| | `` | Yes | - | IP or hostname | | `[user]` | No | `root` | SSH username | | `[port]` | No | `22` | SSH port | ``` ```bash claw2claw setup 192.168.1.100 claw2claw setup 192.168.1.100 admin claw2claw setup 192.168.1.100 admin 2222 claw2claw setup myserver.example.com ``` ```markdown ### What Happens 1. Tests SSH connectivity 2. Adds SSH key to remote if needed 3. Saves config to `~/.claw2claw.conf` ``` `SKILL.md:35`: ```bash claw2claw setup 192.168.1.100 --user root ``` `SKILL.md:77-81`: ```bash REMOTE_HOST="192.168.1.100" # Remote IP/hostname REMOTE_USER="root" # SSH user REMOTE_PORT="22" # SSH port SSH_KEY="/path/to/key" # Custom SSH key RSYNC_BWLIMIT=1000 # KB/s limit ``` `references/examples.md:65-74`: ```markdown ## Multi-Agent Setup **Agent A:** ```bash claw2claw setup --user root ``` **Agent B:** ```bash claw2claw setup --user root ``` ``` ### Technical Analysis The documented `setup` workflow defaults to the `root` SSH account and states that it adds an SSH key to the remote system. The examples also recommend reciprocal root setup between two agents. This creates persistent, key-based administrative access even though ordinary file transfer generally requires access only to designated source and destination directories. This exceeds the minimum privileges necessary for the declared file-transfer functionality. A dedicated, unprivileged transfer account with narro ...[truncated 1895 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (19)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · SKILL.md (reported line 296)May include surrounding context.

Uninstall

bash
rm /usr/local/bin/claw2claw
rm ~/.claw2claw.conf
rm -rf ~/.claw2claw/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · SKILL.md (reported line 297)May include surrounding context.

bash
rm /usr/local/bin/claw2claw
rm ~/.claw2claw.conf
rm -rf ~/.claw2claw/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · SKILL.md (reported line 298)May include surrounding context.

bash
rm /usr/local/bin/claw2claw
rm ~/.claw2claw.conf
rm -rf ~/.claw2claw/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · SKILL.md (reported line 298)May include surrounding context.

bash
rm /usr/local/bin/claw2claw
rm ~/.claw2claw.conf
rm -rf ~/.claw2claw/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · references/examples.md (reported line 21)May include surrounding context.

claw2claw send /tmp/backup-$DATE.tar.gz /backups/

Cleanup

rm /tmp/backup-$DATE.tar.gz

text

### Add to Cron

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · references/examples.md (reported line 154)May include surrounding context.

mkdir /tmp/js-files cp $(find ./src -name "*.js") /tmp/js-files/ claw2claw send /tmp/js-files/ /remote/src/ rm -rf /tmp/js-files

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

Scanner excerpt · references/examples.md (reported line 154)May include surrounding context.

mkdir /tmp/js-files cp $(find ./src -name "*.js") /tmp/js-files/ claw2claw send /tmp/js-files/ /remote/src/ rm -rf /tmp/js-files

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · SKILL.md (reported line 215)May include surrounding context.

echo "test" > /tmp/test.txt claw2claw send /tmp/test.txt /tmp/ claw2claw get /tmp/test.txt /tmp/ rm /tmp/test.txt

text

### Connection Test

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · references/examples.md (reported line 172)May include surrounding context.

echo "test" > /tmp/test.txt claw2claw send /tmp/test.txt /tmp/ claw2claw get /tmp/test.txt /tmp/ rm /tmp/test.txt

text

### Connection Test

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

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).

Content

Scanner excerpt · references/examples.md (reported line 191)May include surrounding context.

claw2claw send /huge-file.tar.gz /remote/

If really stuck, delete partial and retry

ssh user@host "rm /remote/huge-file.tar.gz.part" claw2claw send /huge-file.tar.gz /remote/

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages file transfer and bidirectional sync but does not clearly warn that these actions operate over the network and may overwrite, replicate, or delete user data on remote systems depending on rsync behavior. In an agent context, omission of that warning increases the chance of unsafe use, especially when users may assume a local-only or low-risk operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The quick-start example uses --user root for remote setup without any warning or justification, normalizing privileged remote access as the default. If copied by users or agents, this expands the blast radius of mistakes or compromise to full remote system control and unrestricted file modification.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 120)May include surrounding context.

Linux

bash
# Pre-installed on most distros
sudo apt install rsync

macOS

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 225)May include surrounding context.

Linux

bash
# Pre-installed on most distros
sudo apt install rsync

macOS

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation states that setup 'adds SSH key to remote if needed' and 'saves config to ~/.claw2claw.conf' but does not clearly warn users that it modifies remote authentication and persists connection details locally. In an agent-to-agent transfer context, undocumented credential and access changes can lead to users granting broader or more durable access than intended, especially when the default user is root.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/examples.md (reported line 26)May include surrounding context.

Add to Cron

bash
crontab -e
# Add: 0 2 * * * /path/to/backup-script.sh

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The database dump example creates and transfers a plaintext SQL backup, which commonly contains sensitive application and user data, but provides no warning about confidentiality, destination trust, or secure cleanup. In this skill's context, transferring backups is expected, yet omitting safeguards makes accidental exposure more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The multi-agent setup example normalizes using --user root on both sides without caution, which promotes persistent remote file-transfer capability under full administrative privileges. In a cross-machine sync tool, that materially raises the blast radius of mistakes, credential compromise, and unauthorized access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The emergency recovery and selective transfer examples encourage broad copying of sensitive directories like /home, /var/log, and /etc without any warning about secrets, personal data, or system configuration exposure. In a file-transfer skill, this is contextually plausible, but the lack of cautions increases the chance an operator exfiltrates or mishandles high-sensitivity data during routine use.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.