Back to skill

Security audit

Agent Council

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned, but it can make persistent agent, gateway, Discord, and workspace changes with some weak safeguards.

Review before installing. Use it only if you intend to let it create persistent OpenClaw agents, modify gateway configuration, use your Discord bot token to create or rename channels, and optionally add recurring cron jobs. Prefer running from a clean, trusted workspace; inspect generated config patches before applying; avoid using the recursive rename feature on untrusted directories; and make a gateway config backup before running create-agent.sh.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rename_channel.py:80
Finding

Workspace traversal follows symbolic links and can overwrite files outside the selected workspace

Content
View full analysis
List[str]: """Search and update workspace files with new channel name.""" updated_files = [] # Patterns to replace patterns = [ (f"#{old_name}", f"#{new_name}"), # Channel mentions (f'"{old_name}"', f'"{new_name}"'), # Quoted references (f"/{old_name}/", f"/{new_name}/"), # Path-like references ] # Search all markdown files for md_file in workspace.rglob("*.md"): if md_file.is_file(): content = md_file.read_text() original_content = content # Apply all patterns for old_pattern, new_pattern in patterns: content = content.replace(old_pattern, new_pattern) # Write back if changed if content != original_content: md_file.write_text(content) updated_files.append(str(md_file.relative_to(workspace))) ``` ### Technical Analysis The function recursively searches every Markdown file beneath a user-supplied workspace and writes replacements directly to each matching file. It does not verify whether a candidate is a symbolic link or whether its resolved target remains within the selected workspace. `Path.is_file()`, `Path.read_text()`, and `Path.write_text()` follow symbolic links. Consequently, a path that appears to be inside the workspace can refer to a file elsewhere on the filesystem. If that external file contains one of the replacement patterns, the script writes through the symbolic link and modifies the external target. The function also applies broad textual replacements to every Markdown file rather than limiting ...[truncated 1828 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create-agent.sh:172
Finding

Gateway configuration retrieval fails open and may replace existing agent configuration

Content
View full analysis
/dev/null || echo "{}") # Extract existing agents list EXISTING_AGENTS=$(echo "$CURRENT_CONFIG" | jq -c '.agents.list // []') ``` The resulting agent list is subsequently applied to the gateway: ```bash # 6. Apply config patch echo -e "${YELLOW}⚙️ Applying gateway config...${NC}" echo "$CONFIG_PATCH" | jq . echo "" # Write to temp file and apply TEMP_CONFIG=$(mktemp) echo "$CONFIG_PATCH" > "$TEMP_CONFIG" openclaw gateway config.patch --raw "$(cat $TEMP_CONFIG)" --note "Add $NAME agent via agent-creator skill" rm "$TEMP_CONFIG" ``` ### Technical Analysis The script is intended to preserve existing agents by retrieving the current gateway configuration and appending a new agent. However, any failure of `openclaw gateway config.get` is converted to the valid JSON object `{}`: ```bash ... || echo "{}" ``` The script then interprets the absent `agents.list` property as an empty list: ```bash .agents.list // [] ``` This makes two materially different states indistinguishable: - The gateway genuinely has no configured agents. - Configuration retrieval failed because of a gateway outage, authentication problem, permission error, command failure, or malformed response. The script proceeds to construct and apply a patch containing the newly created agent list. Depending on OpenClaw’s patch semantics, applying the reconstructed `agents.list` can replace the existing list with a list containing only the new agent. Suppression of standard error also conceals ...[truncated 1659 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Do not suppress the underlying error output unless it is captured and presented in a clear diagnostic message. 3. Validate that the response is valid JSON: ```bash if ! jq -e . >/dev/null 2>&1 <<<"$CURRENT_CONFIG"; then echo "Error: Gateway returned invalid JSON" >&2 exit 1 fi ``` 4. Validate that `.agents.list`, when present, is an array: ```bash jq -e '(.agents.list == null) or (.agents.list | type == "array")' \ >/dev/null <<<"$CURRENT_CONFIG" || exit 1 ``` 5. Prefer an atomic gateway operation that appends or updates one agent by ID without replacing the complete list. 6. Detect duplicate agent IDs and require an explicit update or replacement option instead of adding duplicate entries. 7. Display a configuration diff and request confirmation before replacing a gateway-wide list. 8. Create a recoverable backup or obtain a configuration revision identifier before applying the patch. 9. If supported, use optimistic concurrency control so the patch is rejected when the gateway configuration changes between retrieval and update. 10. Install cleanup handling for the temporary file: ```bash TEMP_CONFIG=$(mktemp) trap 'rm -f "$TEMP_CONFIG"' EXIT ``` ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
Findings (21)

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

})

text

### Send Messages to Agents

**Direct communication:**
```typescript

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

})

text

### Send Messages to Agents

**Direct communication:**
```typescript

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

text

**4. Agent-to-agent communication:**
Agents can send messages to each other:
```typescript
// In Watson's context
sessions_send({

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

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

text

**4. Agent-to-agent communication:**
Agents can send messages to each other:
```typescript
// In Watson's context
sessions_send({

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description is substantially broader than the actual code. This chunk does not provide a general toolkit for autonomous AI agent creation or multi-agent system setup; it only handles renaming an existing Discord channel and updating related references. While 'managing Discord channel organization' loosely overlaps, the implementation is narrowly focused on one channel-maintenance task plus local file updates and config inspection. That makes the description materially inaccurate for this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code chunk only performs Discord channel setup tasks: reading local config, retrieving a Discord bot token/guild ID, checking whether a text channel exists, optionally creating it, and generating a gateway configuration patch containing the provided context. It does not contain any functionality for creating autonomous AI agents or setting up multi-agent systems, which are central parts of the declared description. The Discord channel management portion is accurate, but the overall declared purpose materially overstates and misrepresents the code’s actual behavior.

Content

No source excerpt is available for this finding.

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

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

md
### Finding Discord IDs

**Enable Developer Mode:**
- Settings → Advanced → Developer Mode

**Copy IDs:**

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

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

md
### Finding Discord IDs

**Enable Developer Mode:**
- Settings → Advanced → Developer Mode

**Copy IDs:**

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

md
1. **Organize channels in categories** - Group related agent channels
2. **Use descriptive channel names** - Clear purpose from the name
3. **Set specific system prompts** - Give each channel clear context
4. **Document agent responsibilities** - Keep SOUL.md updated
5. **Set up memory cron jobs** - For agents with ongoing work
6. **Test agents individually** - Before integrating into team

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/rename_channel.py (reported line 109)May include surrounding context.

python
try:
        prompt = config['channels']['discord']['guilds'][guild_id]['channels'][channel_id].get('systemPrompt', '')
        if old_name in prompt:
            return prompt
    except (KeyError, TypeError):
        pass
    return None

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · README.md (reported line 16)May include surrounding context.

md
- Optional cron job setup

**Discord Channel Management:**
- Create Discord channels via API
- Configure OpenClaw gateway allowlists
- Set channel-specific system prompts
- Rename channels and update references

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README explicitly states that agent creation updates gateway configuration, adds bindings, restarts the gateway, and may set up cron jobs, but it does not prominently warn that running the scripts will modify local config and affect running processes. This is dangerous because users may execute examples assuming they are low-risk setup commands, causing unintended persistent system changes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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 · README.md (reported line 489)May include surrounding context.

md
- `--emoji` (required) - Agent emoji
- `--specialty` (required) - What the agent does
- `--model` (required) - LLM to use (provider/model-name)
- `--workspace` (required) - Where to create agent files
- `--discord-channel` (optional) - Discord channel ID to bind

### setup-channel.py

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that involve reading environment-derived values, modifying files, patching gateway configuration, and interacting with Discord, but it does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens least-privilege controls and makes it easier for an agent to invoke broader capabilities than a user may expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill encourages autonomous creation of files, config changes, Discord channel operations, gateway restarts, and optional cron setup without an explicit warning or confirmation boundary around these side effects. In an agentic environment, that can lead to unexpected persistent system and communication changes from a user's high-level request.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

The skill is designed to create persistent agent workspaces, identity files, memory directories, bindings, and optional scheduled jobs. Persistent artifacts and automation increase attack surface because a mistaken or abused invocation can leave long-lived agents, files, and tasks that continue operating after the initial session ends.

Content

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

md
- **Emoji** (e.g., "🔬")
- **Specialty** (what the agent does)
- **Model** (which LLM to use)
- **Workspace** (where to create agent files)
- **Discord channel ID** (optional)

#### 2. Run Creation Script

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

This section again confirms persistent state creation through agent files, workspace setup, gateway updates, and optional channel bindings. Persistence is risky in agent skills because it can establish durable behavior, future execution, or retained context beyond the user's immediate awareness.

Content

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

md
- `--emoji` (required) - Agent emoji
- `--specialty` (required) - What the agent does
- `--model` (required) - LLM to use (provider/model-name)
- `--workspace` (required) - Where to create agent files
- `--discord-channel` (optional) - Discord channel ID to bind

**Output:**

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

This script offers to create a recurring cron task tied to an agent session, establishing ongoing autonomous behavior after the initial setup. In the context of an agent-creation toolkit, that persistence is more dangerous because it normalizes long-lived background execution that can continue modifying memory and acting on prompts without continuous operator review.

Content

Scanner excerpt · scripts/create-agent.sh (reported line 294)May include surrounding context.

sh
echo -e "${YELLOW}📅 Memory System${NC}"
echo ""
echo "Would you like to set up a daily memory cron job for $NAME?"
echo "This will create a job that reviews and updates the agent's daily memory file."
echo ""
read -p "Create daily memory cron? (y/n): " -n 1 -r
echo ""

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script creates a cron job that performs persistent autonomous writes to the agent's memory and instructs the agent to reply 'HEARTBEAT_OK (silent operation)'. That behavior reduces visibility at execution time and can allow background state changes to accumulate without an immediate user-facing prompt or audit confirmation, which is risky in an agent-management skill designed to create autonomous agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script recursively rewrites markdown files in the supplied workspace without any dry-run, confirmation prompt, backup, or path allowlist. In an agent toolkit context, a mistaken or attacker-influenced workspace path can cause bulk unintended modifications to documentation or operational files, leading to integrity loss and difficult-to-review changes.

Content

No source excerpt is available for this finding.

Excessive Permissions

Low
Category
Privilege Escalation
Confidence
80% confidence
Finding

Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.

Content

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

md
## Requirements

**Bot Permissions:**
- `Manage Channels` - To create/rename channels
- `View Channels` - To read channel list
- `Send Messages` - To post in channels

Static analysis

No suspicious patterns detected.