Back to skill

Security audit

Claw Connector

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate collaboration purpose, but it needs Review because peer-provided data and address tokens can persistently influence the agent and expand network access beyond the stated relay boundary.

Review before installing. Use an isolated environment, pin dependencies yourself, verify any peer address token uses the relay you expect, and only run the listener for peers you trust. Be aware that peer text can be saved locally and resurfaced in agent notifications.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T02 · Agent Memory Poisoning

Error
Location
listener.py:273
Finding

Peer-Controlled Content Is Persisted and Injected into Agent Sessions Without a Safe Trust Boundary

Content
View full analysis
str: """Strip Unicode direction-override characters. SECURITY T1.""" return "".join(ch for ch in text if ord(ch) not in _DIRECTION_OVERRIDES) def strip_control_characters(text: str) -> str: """Strip null bytes and non-printable control characters.""" return "".join( ch for ch in text if ch == "\n" or ch == "\t" or (not unicodedata.category(ch).startswith("C")) ) def sanitize_string(text: str) -> str: """Full sanitization pipeline for untrusted peer strings. SECURITY T1.""" if not isinstance(text, str): raise ValueError("Expected string input") result = strip_direction_overrides(text) result = strip_control_characters(result) return result ``` The listener computes whether the peer is trusted, but the inbound `HANDOFF` branch persists peer-controlled fields without enforcing that result: ```python # Peer trust check — SECURITY T4 trusted = is_peer_trusted(workspace_root, peer_pubkey_hex) # Receive the incoming message — could be PROPOSE (negotiation) or HANDOFF (context passing) try: incoming_msg = await recv_noise_message(noise_conn, ws, timeout=60.0) except (asyncio.TimeoutError, ValueError, websockets.exceptions.ConnectionClosed) as e: LOG.info("No message received from %s: %s", peer_ip, e) return msg_type_recv = incoming_msg.get("msg_type") # ── HANDOFF: peer is passing completed work + context ────────────────────── if msg_type_recv == MsgType.HAND ...[truncated 5724 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
negotiate.py:749
Finding

Untrusted Address Tokens Can Redirect WebSocket Connections to Arbitrary Endpoints

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Setup Dependencies Are Installed Without Exact Version or Integrity Pinning

Content
View full analysis
=3.10 python_packages: - PyNaCl>=1.5 - noiseprotocol>=0.3 - websockets>=12.0 ``` ```yaml install: skill_dir: skills/claw-bond/ hooks_dir: hooks/ post_install_command: "pip3 install PyNaCl noiseprotocol websockets" ``` The relay dependency is also open-ended: ```text # claw-diplomat relay — Python dependencies # Only one non-stdlib package needed: websockets websockets>=12.0 ``` ### Technical Analysis The installation process resolves whichever versions are current at installation time. No lock file, exact version pin, package hash, or reproducible environment specification is provided. This does not prove that the named packages are currently malicious. The security issue is that the reviewed source tree does not uniquely determine the code that will execute after installation. A compromised upstream package, malicious future release, dependency takeover, or incompatible update can alter runtime behavior without any change to this Skill. Python package installation can execute build backends or installation-related code with the privileges of the user running `pip3`. The packages also execute in the same process as the Skill and the ...[truncated 1335 chars]
Remediation
View remediation
noiseprotocol== websockets== ``` 2. Generate a hash-locked requirements file and install with: ```bash pip install --require-hashes -r requirements.lock ``` 3. Pin and hash transitive dependencies as well as direct dependencies. 4. Use an isolated virtual environment rather than modifying the global Python environment. 5. Prefer prebuilt, verified wheels and disable source builds where feasible. 6. Maintain separate lock files for the Skill client and relay service. 7. Add automated dependency vulnerability scanning and reviewed update pull requests. 8. Ensure installation metadata, documentation, and deployment files all use the same locked versions. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The manual describes persistent modification of multiple local files, token lifecycle management, and cron/registry-like state beyond the user-facing summary. Hidden or under-disclosed persistence and file modification behavior can materially affect user trust and create opportunities for unintended data exposure or difficult-to-remove state.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `listener.py` — background inbound relay listener. Started manually by the user or agent (`python3 listener.py &` in terminal). The `diplomat-gateway` hook on

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `listener.py` — background inbound relay listener. Started manually by the user or agent (`python3 listener.py &` in terminal). The `diplomat-gateway` hook on

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · relay/README.md (reported line 16)May include surrounding context.

bash
# 1. Clone or copy this directory onto your server
# 2. Configure environment
cp .env.example .env
# Edit .env — set RELAY_SECRET to a strong random value

# 3. Start

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · relay/README.md (reported line 17)May include surrounding context.

md
# claw-diplomat relay — docker-compose.yml
# Self-hosted relay for claw-diplomat peer sessions.
# Usage:
#   cp .env.example .env   # then fill in RELAY_SECRET
#   docker compose up -d

services:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · relay/docker-compose.yml (reported line 4)May include surrounding context.

yaml
# claw-diplomat relay — docker-compose.yml
# Self-hosted relay for claw-diplomat peer sessions.
# Usage:
#   cp .env.example .env   # then fill in RELAY_SECRET
#   docker compose up -d

services:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · relay/docker-compose.yml (reported line 22)May include surrounding context.

yaml
# claw-diplomat relay — docker-compose.yml
# Self-hosted relay for claw-diplomat peer sessions.
# Usage:
#   cp .env.example .env   # then fill in RELAY_SECRET
#   docker compose up -d

services:

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

Copying os.environ wholesale into a subprocess gives the tested skill access to all ambient secrets available to the parent process, including CI tokens, cloud credentials, and local API keys. In an agent-skill ecosystem, where the executed code should be treated as potentially adversarial, this substantially increases the blast radius of any malicious or compromised child code.

Content

Scanner excerpt · test_integration.py (reported line 85)May include surrounding context.

python
def run_cmd(args: list, ws: str, timeout=20, stdin="") -> tuple[int, str]:
    env = {**os.environ, "DIPLOMAT_WORKSPACE": ws}
    try:
        r = subprocess.run(
            [sys.executable, str(NEGOTIATE)] + args,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% 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 · test_integration.py (reported line 866)May include surrounding context.

python
# Inject a session with adversarial proposal text
        inject_session(ws, peer_alias="Attacker",
                       final_terms={
                           "my_tasks": ["$(rm -rf /tmp/evil)"],
                           "your_tasks": ["`id`"],
                           "deadline": "2099-01-01T00:00:00+00:00",
                           "checkin_at": "2099-01-01T00:00:00+00:00",

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · test_integration.py (reported line 866)May include surrounding context.

python
# Inject a session with adversarial proposal text
        inject_session(ws, peer_alias="Attacker",
                       final_terms={
                           "my_tasks": ["$(rm -rf /tmp/evil)"],
                           "your_tasks": ["`id`"],
                           "deadline": "2099-01-01T00:00:00+00:00",
                           "checkin_at": "2099-01-01T00:00:00+00:00",

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% 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 · test_integration.py (reported line 866)May include surrounding context.

python
# Inject a session with adversarial proposal text
        inject_session(ws, peer_alias="Attacker",
                       final_terms={
                           "my_tasks": ["$(rm -rf /tmp/evil)"],
                           "your_tasks": ["`id`"],
                           "deadline": "2099-01-01T00:00:00+00:00",
                           "checkin_at": "2099-01-01T00:00:00+00:00",

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares broad capabilities in metadata and throughout the manual—shell, file writes, network access, and persistence mechanisms—but does not declare a tool scope or permission boundary. That makes the effective trust boundary unclear and increases the chance that an agent or user installs a skill with more power than expected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language triggers are broad and likely to activate during normal conversation, causing the skill to enter negotiation flows unexpectedly. Over-broad activation can lead to unintended file/network actions or social-engineering-style confirmation prompts based on casual user text.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup process modifies keys and state files, appends to HEARTBEAT.md, and registers cron, but the skill description does not prominently warn users of these side effects before installation. Hidden persistence and file modification reduce informed consent and can leave long-lived artifacts on the system.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

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

md
When `skills/claw-bond/diplomat.key` does NOT exist:

1. Generate NaCl Curve25519 keypair
2. Write private key bytes to `skills/claw-bond/diplomat.key` → chmod 600
3. Write public key hex to `skills/claw-bond/diplomat.pub` → chmod 644
4. Initialize `peers.json` as `{"peers":[]}` and `ledger.json` as `{"sessions":[]}`
5. Append `## Diplomat Deadline Check` block to `HEARTBEAT.md` (idempotent — check for duplicate first)

Static analysis

No suspicious patterns detected.