Back to skill

Security audit

Multi-Agent Create

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its stated agent-setup purpose, but it asks for powerful messaging credentials in chat and contains unsafe setup-script handling that can persistently alter agent files.

Review before installing. Do not paste real bot tokens, app secrets, or service-account keys into chat; provision them through a secret manager, protected local config, or environment variables instead. Use only simple validated agent identifiers, inspect generated workspace files and openclaw.json changes before activation, and avoid restarting a live gateway until you understand the impact.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup-agent.sh:13
Finding

Path Traversal Through an Unvalidated Agent Name Allows File Overwrite Outside the Workspace Root

Content
View full analysis
[credentials...]}" CHANNEL="${2:?Please specify channel: telegram|discord|slack|feishu|whatsapp|signal|googlechat}" AGENT_ID="${AGENT_NAME,,}-agent" AGENT_DIR="${AGENT_NAME,,}" STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}" WORKSPACE_DIR="${STATE_DIR}/workspace-groups/${AGENT_DIR}" CONFIG_PATH="${STATE_DIR}/openclaw.json" ``` ```bash # 2. Create workspace mkdir -p "${WORKSPACE_DIR}" # 3. Register agent openclaw agents add "${AGENT_ID}" 2>/dev/null || true # 4. Generate workspace files cat > "${WORKSPACE_DIR}/IDENTITY.md" << EOF # IDENTITY.md - **Name:** ${AGENT_NAME} - **Role:** [Define role here] - **Emoji:** 🤖 EOF cat > "${WORKSPACE_DIR}/SOUL.md" << EOF # SOUL.md You are ${AGENT_NAME}, an independent AI assistant. Be genuinely helpful. Have opinions. Try before asking. Keep private things private. Never send half-baked replies. EOF cat > "${WORKSPACE_DIR}/AGENTS.md" << EOF # AGENTS.md ## On startup 1. Read SOUL.md 2. Read IDENTITY.md 3. Read USER.md if present ## Memory Write important notes to memory/YYYY-MM-DD.md EOF cat > "${WORKSPACE_DIR}/USER.md" << EOF # USER.md - **Name:** [User Name] - **Timezone:** UTC EOF touch "${WORKSPACE_DIR}/HEARTBEAT.md" touch "${WORKSPACE_DIR}/TOOLS.md" ``` ### Technical Analysis The script directly incorporates the caller-controlled `AGENT_NAME` into `WORKSPACE_DIR`. It does not enforce an identifier format, reject path separators, or verify the canonical destination against the intended `workspace-groups` directory. An agent name containing `../` components can make the effective workspace resolve outside `${STATE_DIR}/workspace-groups`. The script then creates the resulting directory and unconditionally redirects content into fixed filenames s ...[truncated 1934 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Maintain separate values for a validated directory identifier and a human-readable display name. 3. Canonicalize the workspace root and destination, then verify that the destination remains a direct child of the workspace root. 4. Reject names containing `/`, `\`, `..`, newlines, control characters, or leading hyphens. 5. Refuse to overwrite an existing workspace unless the user explicitly requests a safe update operation. 6. Use protections against symbolic-link traversal. Verify directories and files with `lstat`-equivalent checks and create new files using no-follow and exclusive-creation semantics where possible. 7. Write generated content to safely created temporary files in the destination and atomically rename them only after validation. 8. Add tests covering traversal strings, absolute-looking paths, repeated separators, control characters, and pre-existing symbolic links. ]]>

T02 · Agent Memory Poisoning

Error
Location
scripts/setup-agent.sh:13
Finding

Untrusted Agent Names Can Persistently Inject Instructions Into Agent Startup Files

Content
View full analysis
[credentials...]}" CHANNEL="${2:?Please specify channel: telegram|discord|slack|feishu|whatsapp|signal|googlechat}" AGENT_ID="${AGENT_NAME,,}-agent" AGENT_DIR="${AGENT_NAME,,}" ``` ```bash cat > "${WORKSPACE_DIR}/IDENTITY.md" << EOF # IDENTITY.md - **Name:** ${AGENT_NAME} - **Role:** [Define role here] - **Emoji:** 🤖 EOF cat > "${WORKSPACE_DIR}/SOUL.md" << EOF # SOUL.md You are ${AGENT_NAME}, an independent AI assistant. Be genuinely helpful. Have opinions. Try before asking. Keep private things private. Never send half-baked replies. EOF cat > "${WORKSPACE_DIR}/AGENTS.md" << EOF # AGENTS.md ## On startup 1. Read SOUL.md 2. Read IDENTITY.md 3. Read USER.md if present ## Memory Write important notes to memory/YYYY-MM-DD.md EOF ``` ### Technical Analysis `AGENT_NAME` is treated both as an identifier and as trusted natural-language content. It is interpolated without validation into `IDENTITY.md` and `SOUL.md`. A quoted shell argument may contain newline characters and Markdown content. Consequently, a crafted name can terminate the intended sentence or field and append arbitrary instructions to these files. The generated `AGENTS.md` explicitly tells the new agent to read `SOUL.md` and `IDENTITY.md` on startup, turning the injected content into persistent agent state. This differs from a transient prompt injection because the payload is saved to disk and can affect future sessions whenever the workspace is loaded. ### Attack Path 1. The attacker controls or influences the name supplied during agent creation. 2. The attacker supplies a multiline name containing additional Markdown instructions. 3. The helper script interpolates the complete value into `IDENTITY.md` and `SOU ...[truncated 1176 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:60
Finding

Messaging Platform Secrets Are Requested Through the Conversational Transcript

Content
View full analysis
🔑 **Get your Telegram Bot Token:** > 1. Open Telegram and search for **@BotFather** > 2. Send `/newbot` and follow the prompts to name your bot > 3. BotFather will give you a **Bot Token** like `123456789:ABCdefGHI...` > 4. Paste that token here Required: `botToken` #### Discord > 🔑 **Get your Discord Bot Token:** > 1. Go to [Discord Developer Portal](https://discord.com/developers/applications) > 2. Click **New Application** → name it → go to **Bot** tab > 3. Click **Reset Token** and copy the token > 4. Under **Privileged Gateway Intents**, enable **Message Content Intent** > 5. Paste the token here Required: `token` #### Slack > 🔑 **Get your Slack App credentials:** > 1. Go to [Slack API](https://api.slack.com/apps) → **Create New App** > 2. Enable **Socket Mode** → copy the **App-Level Token** (starts with `xapp-`) > 3. Go to **OAuth & Permissions** → install to workspace → copy the **Bot Token** (starts with `xoxb-`) > 4. Paste both tokens here Required: `appToken`, `botToken` ``` ### Technical Analysis The skill explicitly instructs users to paste Telegram, Discord, and Slack credentials into the conversation. Secrets submitted this way become part of the model context and may also be retained in chat history, application logs, observability systems, backups, debugging traces, or model-provider telemetry. The repository does not contain code that intentionally transmits these credentials to a separate attacker-controlled endpoint. The security issue is the collection method itself: a general conversational channel is being used as a plaintext secret-entry mechanism without documented redaction, retention controls, or secure storage boundaries. ### Attack Path 1. A user follows the documented channel-configuration workflow. 2. The us ...[truncated 1190 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly asks users to paste highly sensitive bot tokens, app secrets, and service account material into chat without any warning about secrecy, retention, or safer handling. This is dangerous because chat transcripts, logs, model providers, or downstream tooling may expose long-lived credentials that grant control over external messaging accounts.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is designed to solicit and receive sensitive channel credentials directly through the model conversation, including bot tokens, app secrets, and service account paths. This is a direct secret-handling anti-pattern because the assistant becomes a collection point for credentials that may be logged, retained, or exposed, enabling takeover of integrated messaging channels.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill asks users to obtain and likely input sensitive platform credentials such as bot tokens, app secrets, and service account JSON, but it provides no warning about secure handling, storage, or exposure risks. Because these credentials can grant control over messaging integrations, poor handling could result in account compromise, unauthorized bot actions, or leakage of privileged access.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
|---------|-------------------|
| **Telegram** | Bot Token (from [@BotFather](https://t.me/BotFather)) |
| **Discord** | Bot Token (from [Developer Portal](https://discord.com/developers/applications)) |
| **Slack** | App Token + Bot Token (from [Slack API](https://api.slack.com/apps)) |
| **Feishu / Lark** | App ID + App Secret (from [飞书开放平台](https://open.feishu.cn/)) |
| **WhatsApp** | QR code scan |
| **Signal** | QR code scan |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
|---------|-------------------|
| **Telegram** | Bot Token (from [@BotFather](https://t.me/BotFather)) |
| **Discord** | Bot Token (from [Developer Portal](https://discord.com/developers/applications)) |
| **Slack** | App Token + Bot Token (from [Slack API](https://api.slack.com/apps)) |
| **Feishu / Lark** | App ID + App Secret (from [飞书开放平台](https://open.feishu.cn/)) |
| **WhatsApp** | QR code scan |
| **Signal** | QR code scan |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation phrases 'Create a new agent' and 'Add a bot' are broad, natural-language triggers that can easily overlap with ordinary user requests. In an agentic environment, this raises the risk of the skill activating unintentionally and causing workspace creation or configuration changes without the user clearly intending to invoke this specific capability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README states that workspaces are auto-generated and gateway configuration is updated automatically, but it does not clearly warn that running the skill will modify local files and service configuration. This can lead to unexpected persistent changes, accidental agent registration, or misconfiguration if users invoke the skill without understanding its side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger examples are broad enough to match ordinary user requests like 'create a new agent' or 'add a bot', which can cause the skill to activate in situations where the user did not intend to begin infrastructure changes. In this skill, unintended activation is more dangerous because the workflow proceeds toward credential collection and gateway configuration changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Feishu section switches to Chinese-only instructions and asks the user to provide credentials in that context, without offering a language choice or explaining that Chinese is required. This can violate language/locale policy expectations when the rest of the skill is written in English and no opt-in is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill directs execution of commands that create workspaces, register agents, alter channel bindings, and restart the gateway, but it does not warn about service disruption, config mutation, or the need to review changes first. In this operational context, an accidental or misunderstood run could interrupt live services or leave the system in a broken state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This shell script backs up configuration, creates directories, and writes multiple workspace files under the user's OpenClaw state directory. Although it prints progress messages, it does not clearly disclose up front that it will create and modify persistent local files and configuration-related state.

Content

No source excerpt is available for this finding.