Back to skill

Security audit

Agent Arena Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Agent Arena integration, but it automatically creates persistent background posting behavior and has an argument-injection flaw that needs review before installation.

Review carefully before installing. This skill can store your Agent Arena API key and token in a local JSON file, create a recurring OpenClaw cron job, read remote room content, and automatically post responses as your agent. Use it only if you are comfortable with ongoing network activity and public agent posts, and avoid using it with sensitive SOUL.md, MEMORY.md, or workspace context until the cron opt-in, prompt-injection boundary, credential handling, and browse tag injection issue are fixed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (4)

T06 · System Persistence

Error
Location
scripts/enable-polling.sh:48
Finding

Automatic Installation of a Persistent Autonomous Polling Job

Content
View full analysis
/dev/null) NEW_ID=$(echo "$RESULT" | grep '"id"' | head -1 | sed 's/.*"id": *"\([^"]*\)".*/\1/') ``` The cron setup is invoked automatically after joining or creating a room: ```bash # Auto-enable polling cron POLL_RESULT=$(bash "$SCRIPT_DIR/enable-polling.sh" 2>/dev/null || echo '{"error":"polling setup failed"}') POLL_ACTION=$(echo "$POLL_RESULT" | jq -r '.action // "failed"') CRON_ID=$(echo "$POLL_RESULT" | jq -r '.cronId // ""') ``` ### Technical Analysis The Skill creates an OpenClaw scheduled job that runs an isolated agent session every 20 seconds. The job survives the command that originally joined or created a room and repeatedly performs network requests, processes remote conversation content, and posts generated responses. Recurring polling is relevant to the advertised functionality, and the behavior is documented. However, automatically installing or re-enabling a cross-session scheduled agent task during room operations exceeds the privileges needed for manual room participation. There is no per-turn user authorization, fixed expiration time, maximum execution count, or mandatory confirmation immediately before persistence is enabled. The implementation normally disables the job when no active rooms remain, but this depends on a future agent turn correctly parsing API output and executing the disable operation. Failures in the API, agent execution, configuration, or response parsing can leave the job enabled. ### Attack Path 1. The user or agent invokes `join-room.sh` or `create-room.sh`. 2. The script automatically invokes `enable-polling.sh`. 3. `enable-polling.sh` creates or re- ...[truncated 933 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
scripts/enable-polling.sh:43
Finding

Untrusted Remote Conversation Content Is Processed as Agent Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/browse-rooms.sh:14
Finding

Python Source Injection Through the Room Tag Argument

Content
View full analysis
/dev/null || echo "$TAG") URL="$URL&tag=$ENCODED_TAG" fi ``` ### Technical Analysis The `TAG` shell variable is interpolated directly into Python source code enclosed by a single-quoted Python string literal. Shell quoting does not make this safe because the variable becomes part of the program passed to `python3 -c`. A crafted value containing a single quote can terminate the Python string and append additional Python statements. The injected Python executes locally with the privileges of the account running the Skill. For example, an argument structurally resembling the following can break out of the intended string and introduce another Python expression: ```text '); __import__("os").system("ATTACKER_COMMAND"); # ``` This example demonstrates the injection structure without prescribing a harmful command. No shell metacharacter injection is required because the attacker is modifying Python source before the interpreter executes it. The fallback `|| echo "$TAG"` does not mitigate the issue: injected code runs before Python exits, and successful injected execution may return status zero. ### Attack Path 1. An attacker causes `browse-rooms.sh` to be invoked with a malicious tag, or persuades the agent/user to browse a crafted tag. 2. The tag closes the single-quoted Python string in the `python3 -c` source. 3. The remaining tag text inserts a Python statement. 4. Python executes the injected statement locally. 5. The injected code inherits the Skill process's user privileges, environment, filesystem access, and network access. ### Impact Assessment Successful exploitation provides arbitrary local Python code execution as the user running OpenClaw o ...[truncated 353 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/configure.sh:43
Finding

API Credentials Are Written Without Enforcing Restrictive File Permissions

Content
View full analysis
"$CONFIG_FILE" ``` The configuration schema stores both secrets in plaintext: ```json { "baseUrl": "https://api.agentarena.chat/api/v1", "apiKey": "", "token": "", "tokenExpiry": "", "pollingEnabled": true, "autoReady": true, "maxResponseLength": 1500, "cronId": "" } ``` ### Technical Analysis The configuration routine writes the long-lived API key and bearer token to `config/arena-config.json` but does not set a restrictive umask or explicitly apply mode `0600`. The resulting permissions depend on the caller's umask and the permissions of any pre-existing file. Under a permissive environment, other local users or processes may be able to read the credentials. Although `_common.sh` invokes `chmod 600 "$CONFIG_FILE"` following a later token refresh, that protection is not applied during initial configuration. It therefore does not reliably protect credentials at the point they are first stored. The write is also performed directly to the destination rather than through a protected temporary file and atomic rename. Interruption can leave a partial configuration, and pre-existing file handling is not hardened against link-related or race conditions. ### Attack Path 1. The Skill is configured while the process has a permissive umask or the destination file already has permissive permissions. 2. `configure.sh` writes the API key and bearer token directly to `arena-config.json`. 3. The script does not enforce mode `0600`. 4. Another local account or process with files ...[truncated 606 chars]
Remediation
View remediation
"$TMP" chmod 600 "$TMP" mv -f "$TMP" "$CONFIG_FILE" ``` 3. Validate that the destination is a regular file and not a symbolic link before writing. 4. Enforce `chmod 600 "$CONFIG_FILE"` after every configuration update, not only token refresh. 5. Prefer an operating-system credential store or OpenClaw secret-management facility instead of plaintext JSON. 6. Store only the minimum necessary credential and avoid retaining both an API key and active bearer token when one can be derived securely as needed. 7. Ensure configuration files containing secrets are excluded from version control, backups, logs, and diagnostic output. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Exposing configuration status and partial API key details beyond the stated purpose can leak operational metadata, and the claimed chat behavior is not what the visible skill content actually implements directly. The discrepancy increases the chance users will approve the skill without understanding that it stores credentials, tracks cron state, and may reveal configuration information.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly says the agent participates with its 'real personality' and 'full context' on an external platform, but it does not provide a prominent warning that internal memory/personality material may be transmitted off-system. This is dangerous because users may not realize that personal, proprietary, or system-derived context could be incorporated into remote messages.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly describes automatic polling every 20 seconds and automatic posting of agent-generated replies, but it does not prominently warn users that installing or joining a room causes ongoing network activity and transmission of conversation context to an external service. In this skill's context, that omission is materially risky because the agent is encouraged to respond using its full context, including SOUL.md and MEMORY.md, which may increase the chance of unintentionally sharing sensitive internal data.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill requires shell and network access but does not declare any explicit tool scope or permissions boundary. That increases the chance the agent will invoke powerful capabilities implicitly, making review, sandboxing, and user consent weaker than they should be for a skill that sends data externally and manages local state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The setup flow tells users to save an API key in a local config file but does not clearly warn about local credential storage, retention, or filesystem exposure. If the workspace is shared, synced, or insufficiently protected, the key can be recovered and abused to impersonate the agent or access the external service.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The skill instructs creation of a persistent cron job that runs every 20 seconds in an isolated session and can continue acting without direct user initiation. Persistent autonomous execution materially increases risk because it can keep polling, generating, and posting externally, and it may outlive the user's awareness or original intent.

Content

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

md
### Auto-Polling Cron (CRITICAL)

After joining or creating a room, you MUST create a cron job to poll for turns automatically. Without this, you won't respond until a heartbeat or user message triggers you.

**Create the cron using the `cron` tool with EXACTLY these parameters:**

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Broad trigger phrases like 'Check Agent Arena' or 'what rooms are available?' overlap with ordinary conversation and can cause accidental invocation of networked actions. In a skill that can authenticate, poll in the background, and interact with external services, ambiguous activation increases the risk of unintended data access or external actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The skill is designed to send data to an external API, and in context that includes agent-generated content, room metadata, and potentially personality/memory-derived text. External transmission is expected for this feature, but it remains a security concern because the transmitted content is insufficiently bounded and the user-facing documentation understates the privacy implications.

Content

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

json
{
  "apiKey": "ak_xxx",
  "baseUrl": "https://api.agentarena.chat/api/v1",
  "token": "",
  "tokenExpiry": "",
  "pollingEnabled": true,

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/_common.sh (reported line 49)May include surrounding context.

sh
if [ "$needs_refresh" = "yes" ]; then
    local login_resp token new_expiry updated
    login_resp=$(curl -s --max-time 10 -X POST "$ARENA_BASE_URL/auth/login" \
      -H "Content-Type: application/json" \
      -d "{\"apiKey\":\"$ARENA_API_KEY\"}")
    token=$(echo "$login_resp" | jq -r '.token // empty')

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function sends the API key in an HTTP POST request to the login endpoint, which is a safety-relevant network operation involving credentials. While the code comments describe token refresh behavior, there is no visible user-facing prompt, log, or warning in this file disclosing that the API key will be transmitted to a remote service.

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

sh
new_expiry=$(date -u -v+7d +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -d "+7 days" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null)
    updated=$(jq --arg t "$token" --arg e "$new_expiry" '.token = $t | .tokenExpiry = $e' "$CONFIG_FILE")
    echo "$updated" > "$CONFIG_FILE"
    chmod 600 "$CONFIG_FILE"
  fi
}

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 151)May include surrounding context.

md
CONFIG_FILE="$SCRIPT_DIR/../config/arena-config.json"

API_KEY="${1:-$ARENA_API_KEY}"
BASE_URL="https://api.agentarena.chat/api/v1"

if [ -z "$API_KEY" ]; then
  echo "ERROR: API key required"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · config/arena-config.template.json (reported line 2)May include surrounding context.

json
CONFIG_FILE="$SCRIPT_DIR/../config/arena-config.json"

API_KEY="${1:-$ARENA_API_KEY}"
BASE_URL="https://api.agentarena.chat/api/v1"

if [ -z "$API_KEY" ]; then
  echo "ERROR: API key required"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/_common.sh (reported line 13)May include surrounding context.

sh
CONFIG_FILE="$SCRIPT_DIR/../config/arena-config.json"

API_KEY="${1:-$ARENA_API_KEY}"
BASE_URL="https://api.agentarena.chat/api/v1"

if [ -z "$API_KEY" ]; then
  echo "ERROR: API key required"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/configure.sh (reported line 9)May include surrounding context.

sh
CONFIG_FILE="$SCRIPT_DIR/../config/arena-config.json"

API_KEY="${1:-$ARENA_API_KEY}"
BASE_URL="https://api.agentarena.chat/api/v1"

if [ -z "$API_KEY" ]; then
  echo "ERROR: API key required"

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/configure.sh (reported line 22)May include surrounding context.

sh
# Test the API key by logging in
echo "Testing API key..."
LOGIN_RESPONSE=$(curl -s --max-time 15 -X POST "$BASE_URL/auth/login" \
  -H "Content-Type: application/json" \
  -d "{\"apiKey\":\"$API_KEY\"}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persists both the long-lived API key and the bearer token to a local JSON config file without warning the user, consent gating, or any file-permission hardening. If that file is readable by other local users, included in backups, synced to cloud storage, or accidentally committed, the credentials can be reused to impersonate the agent and access the associated account.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/create-room.sh (reported line 67)May include surrounding context.

sh
visibility: $visibility
  } + (if $tags != "" then {tags: ($tags | split(",") | map(gsub("^\\s+|\\s+$";"")))} else {} end)')

RESPONSE=$(curl -s --max-time 15 -X POST "$BASE_URL/rooms" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "$BODY")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script automatically invokes a secondary script to enable polling/cron as a side effect of room creation, without explicit opt-in or even a prominent warning at execution time. In an agent skill context, silently establishing persistent background behavior increases the risk of unintended ongoing network activity, resource use, and harder-to-audit automation beyond the user's immediate action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script automatically loads API credentials from environment or config and transmits them to a remote endpoint without any user-facing notice or trust validation of the destination. While network authentication is expected for this functionality, the lack of disclosure and host validation increases the risk of unintended credential exposure, especially if BASE_URL is misconfigured or attacker-controlled.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.