Back to skill

Security audit

agent-team-mesh

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent team-agent messaging purpose, but it handles reusable gateway tokens and agent messages in ways that deserve careful review before installation.

Install only if you are comfortable with teammates sharing reusable OpenClaw gateway tokens, storing them locally, and sending messages over trusted private networks using plaintext WebSockets. Prefer pinned installation, restrict the token file to your user, avoid logging dry-run output, disable or review IM fallback, and rotate tokens if they may have crossed an untrusted network or appeared in logs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/agent-mesh.sh:121
Finding

Arbitrary Python Code Execution Through Environment-Controlled String Interpolation

Content
View full analysis
/dev/null } ``` The local identity is similarly inserted into generated Python source: ```bash MY_EMAIL_PREFIX="$(detect_my_email_prefix)" ``` ```bash python3 << EOF import json try: with open("$REGISTRY_FILE") as f: data = json.load(f) for a in data['agents']: if a['emailPrefix'] == "$MY_EMAIL_PREFIX": print(f"Registry entry: {a['name']}({a.get('redName','-')}) | {a.get('ip','?')}") import os tokens_file = "$TOKENS_FILE" if os.path.exists(tokens_file): with open(tokens_file) as tf: tokens = json.load(tf).get('tokens', {}) if "$MY_EMAIL_PREFIX" in tokens: print(f"Token configured ({tokens['$MY_EMAIL_PREFIX'][:8]}...,{tokens_file})") else: print(f"⚠️ Token not found in {tokens_file} ") else: print(f"⚠️ Tokens file not found: {tokens_file}") break else: print(f"⚠️ $MY_EMAIL_PREFIX not in registry.json (edit references/registry.json or implement sync)") except Exception as e: print(f"❌ Read error: {e}") EOF ``` The broadcast implementation also embeds the identity directly: ```bash python3 -c " import json, os with open('$REGISTRY_FILE') as f: data = json.load(f) tokens = {} if os.path.exists('$TOKENS_FILE'): try: tokens = jso ...[truncated 2189 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/agent-mesh.sh:182
Finding

Gateway Tokens and Agent Messages Are Transmitted Over Plaintext WebSockets

Content
View full analysis
/dev/null | extract_json } ``` ### Technical Analysis The script unconditionally enables insecure private WebSocket connections and constructs every gateway URL with the plaintext `ws://` scheme. Gateway authentication tokens, messages, agent responses, session identifiers, and method parameters therefore lack transport encryption and server authentication. A network attacker positioned on the same segment, VPC path, VPN, compromised router, or container network may be able to observe or manipulate the traffic. Token authentication does not protect confidentiality or integrity when the token itself is sent through an unauthenticated plaintext channel. Although the documentation warns users that plaintext WebSockets should only be used on trusted internal networks, the executable enables this mode by default rather than requiring explicit informed opt-in. ### Attack Path 1. The attacker obtains visibility or control over the network path between the local client and a registered agent gateway. 2. A user runs `send` or `broadcast`. 3. The script connects to `ws://:18789` and supplies the gateway token. 4. The attacker captures the token and message contents or alters WebSocket frames in transit. 5. The captured token may then be replayed directly against the gateway, subject to the gateway's token scope and lifetime. 6. Alternatively, altered replies may inject misleading or hostile content into the local agent workflow. ### Impact Assessment Potential impact includes disclo ...[truncated 457 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agent-mesh.sh:324
Finding

Gateway Token Prefixes Are Exposed in Diagnostic and Dry-Run Output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agent-mesh.sh:121
Finding

Token File Ownership and Permissions Are Not Enforced

Content
View full analysis
/dev/null } ``` ### Technical Analysis The documentation instructs users to apply mode `0600`, but the executable only verifies that the configured path passes `-f`. It does not check: - Whether the file is owned by the current user. - Whether group or other users have read or write permission. - Whether a path component is writable by an untrusted local user. - Whether the path resolves through a symbolic link. - Whether the containing configuration directory has restrictive permissions. Consequently, the application may read credentials from an insecure or attacker-replaceable location. Documentation alone does not enforce the intended credential boundary. ### Attack Path 1. A token file is created with group/world-readable permissions, or its parent directory is writable by another local user. 2. Another local user reads the tokens directly, or replaces the file or its path with attacker-controlled content. 3. The legitimate user invokes `list`, `send`, `broadcast`, or `whoami`. 4. The script accepts the file without ownership or mode validation. 5. Stolen credentials can be replayed against agent gateways. A substituted file can also cause the client to use attacker-selected credentials or disrupt communications. ### Impact Assessment A local atta ...[truncated 496 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:30
Finding

Installation Guidance Executes an Unpinned Third-Party npm Package

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
Findings (23)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

md
## Known limitations

- **`registry.json` IP only** — pods that roll IPs require a re-sync. Some
  hosting platforms (Fly.io / Railway) wipe state on redeploy and may
  give you new IPs.
- **No persistent log** — messages and replies are not archived on this
  side. The remote teammate's gateway keeps full chat history in its own

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The README describes a peer-to-peer design where agent gateway tokens for multiple teammates are collected into a shared local file and used for direct WebSocket access to each agent. In context, this creates durable credential storage and cross-agent trust concentration: compromise of one workstation or token file could enable persistent unauthorized access to multiple teammates' gateways, especially since the transport is explicitly plaintext ws:// on an internal network.

Content

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

md
- *"Broadcast an FYI to all teammates' agents"*

Existing options are heavyweight: stand up a broker (Redis/Supabase), wire
auth/RLS, write polling scripts, etc.

This skill takes a simpler approach: each agent's OpenClaw Gateway already
listens on `:18789` over WebSocket. With per-agent tokens collected in a

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

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 · README.md (reported line 47)May include surrounding context.

prefixes, and pod IPs.

  1. Collect WS tokens from each teammate (they generate via OpenClaw Gateway) and store in ~/.config/agent-team-mesh/tokens.json chmod 600:

    json
    { "tokens": { "alice": "tok_xxx", "bob": "tok_yyy" } }
    

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 104)May include surrounding context.

prefixes, and pod IPs.

  1. Collect WS tokens from each teammate (they generate via OpenClaw Gateway) and store in ~/.config/agent-team-mesh/tokens.json chmod 600:

    json
    { "tokens": { "alice": "tok_xxx", "bob": "tok_yyy" } }
    

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 219)May include surrounding context.

prefixes, and pod IPs.

  1. Collect WS tokens from each teammate (they generate via OpenClaw Gateway) and store in ~/.config/agent-team-mesh/tokens.json chmod 600:

    json
    { "tokens": { "alice": "tok_xxx", "bob": "tok_yyy" } }
    

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares shell-capable behavior but does not specify any tool scope or allowed-tools boundaries in the manifest. That omission increases the chance an agent invokes shell operations with broader privileges than intended, especially for a networking skill that can read local files, environment variables, and send messages to remote peers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger section lacks boundaries describing when the skill must not run, which makes unintended activation more likely. For a networked messaging skill, missing scope constraints raise the risk of accidental data transmission even if the implementation has dry-run support.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The trigger section lacks boundaries describing when the skill must not run, which makes unintended activation more likely. For a networked messaging skill, missing scope constraints raise the risk of accidental data transmission even if the implementation has dry-run support.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill requires teammates to generate gateway tokens and share them so they can be centrally collected into a local tokens.json file. Even with chmod 600, this creates a concentration of reusable credentials for multiple agents, increasing the blast radius if the host is compromised or the file is mishandled, and normalizes credential sharing between users.

Content

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

md
The `emailPrefix` is the key — it must match what `whoami` detects on each
teammate's machine.

### 2. Create tokens file

Each teammate generates their own OpenClaw gateway WS token and shares it.
Collect into:

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 · README.md (reported line 74)May include surrounding context.

md
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 10)May include surrounding context.

md
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 56)May include surrounding context.

md
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 168)May include surrounding context.

md
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 · references/registry.json (reported line 7)May include surrounding context.

json
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 · references/tokens.example.json (reported line 2)May include surrounding context.

json
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

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 · scripts/agent-mesh.sh (reported line 5)May include surrounding context.

sh
{
  "_comment": "Example tokens.json — copy to ${XDG_CONFIG_HOME:-~/.config}/agent-team-mesh/tokens.json and chmod 600",
  "_warning": "Keep this file OUT of git. Add .gitignore rule.",
  "tokens": {
    "alice": "REPLACE_WITH_ALICE_GATEWAY_TOKEN",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script automatically reads MESH_MY_EMAIL, USER.md, and ~/sso.json to detect the local email prefix, which is sensitive identity information. Although the behavior is commented in code, there is no runtime warning or explicit user disclosure when this access occurs, and the data access is not clearly surfaced before execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The get_token_for function loads per-agent tokens from the tokens file, which is credential material. While comments describe the file location, the script does not provide a clear user-facing warning in help text that credentials will be read from disk during send, list, ping, and broadcast operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The fallback path sends the original message to an external IM script whenever a peer is unreachable, which expands the trust boundary beyond the advertised direct P2P mesh. This can leak sensitive user content to a different channel, destination, or implementation without strong confirmation, auditing, or content redaction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-supplied message content is forwarded over the network and may also be rerouted through IM fallback without a strong user-facing warning at the point of transmission. In a tool that may carry operational or sensitive content, implicit external delivery increases the chance of accidental disclosure to unintended systems or recipients.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The trigger section lacks boundaries describing when the skill must not run, which makes unintended activation more likely. For a networked messaging skill, missing scope constraints raise the risk of accidental data transmission even if the implementation has dry-run support.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The inline comment says recipients are sent concurrently with output handled atomically, but the loop launches each recipient block in the background and each block performs multiple writes in several branches. While some success output uses a single printf, many other branches use separate echo calls from concurrent jobs, so the documentation overstates what the code guarantees.

Content

No source excerpt is available for this finding.