Back to skill

Security audit

Agent Spawner

Security checks for vulnerabilities and agentic risk

Overview

This skill fits an agent-deployment purpose, but it silently gathers and reuses credentials, installs mutable code, exposes a gateway, and prints a live token.

Install only if you are comfortable with an agent reading existing OpenClaw config, .env files, and token-like environment variables, copying credentials/plugins/skills into a new persistent agent, running network installers, and exposing a gateway. Prefer a revised version that asks before reading secrets, scopes credentials to exact named values, pins and verifies installers/plugins, defaults to localhost, and does not print live tokens into chat.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:111
Finding

Unverified Remote Installer Executed Directly by Bash

Content
View full analysis
Remediation
View remediation
/install.sh" echo " openclaw-install.sh" | sha256sum -c - bash openclaw-install.sh --no-onboard ``` ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:12
Finding

Silent and Overbroad Collection of Credentials and Environment Secrets

Content
View full analysis
/dev/null env | grep -iE 'API_KEY|TOKEN' ls ~/.openclaw/extensions/ ls /skills/ ``` ``` ### Technical Analysis The Skill instructs the agent to read the complete OpenClaw configuration, the complete `.env` file, and every environment variable whose name contains `API_KEY` or `TOKEN`. It explicitly labels this operation as silent. This exceeds the minimum access required to determine the configured model provider and obtain the single credential needed for the selected deployment. The broad environment-variable search can collect unrelated database tokens, CI/CD credentials, cloud credentials, source-control tokens, search-service keys, or credentials belonging to other applications. Although the audited file does not contain a direct exfiltration destination, values read through these commands may enter model context, command transcripts, tool logs, or later generated deployment commands. Suppressing errors with `2>/dev/null` does not protect the contents of the file. ### Attack Path 1. The Skill is activated to provision a new agent. 2. It silently reads the entire OpenClaw configuration and `.env` file. 3. It enumerates all environment variables with names matching `API_KEY` or `TOKEN`. 4. Unrelated credentials become available in the agent's context or execution transcript. 5. A subsequently installed plugin, copied skill, compromised remote installer, logging system, or accidental assistant response can capture or disclose those credentials. 6. An attacker uses the exposed credentials against the corresponding external services. ### Impact Assessment The accessible scope includes all secrets stored in `~/.openclaw/openclaw.json`, `~/.openclaw/.env`, and matching envi ...[truncated 407 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
SKILL.md:137
Finding

Automatic Installation of Unverified Plugin Specifications

Content
View full analysis
# Repeat for each plugin ``` ``` ### Technical Analysis The Skill automatically carries plugin npm specifications from the existing configuration into the new agent. It does not require an allowlisted registry, an exact immutable version, an integrity hash, or individual user review. An npm specification may reference a mutable version range, tag, remote repository, archive URL, or attacker-controlled package. Package installation can execute lifecycle scripts, and the resulting plugin code may execute with access to the new agent's configuration, credentials, tools, and workspace. A plugin present in the source configuration is not necessarily safe to reinstall from the network. The package may have changed since its original installation, or the existing configuration may already have been modified by an attacker. ### Attack Path 1. An attacker publishes or compromises a package referenced by `plugins.installs`, or modifies the source configuration to include an attacker-controlled npm specification. 2. The user asks the Skill to deploy a new agent. 3. The Skill reads the existing plugin specifications and carries them over by default. 4. `$OC plugins install ` retrieves and installs the current package content. 5. Malicious lifecycle or plugin code executes in the new agent environment. 6. The package accesses copied API credentials, modifies agent behavior, reads workspace data, or communicates with attacker-controlled infrastructure. ### Impact Assessment The installed package can obtain the privileges granted to the OpenClaw process. Its potential scope includes the agent configuration, copied API credentials, plugin directories, workspace files, enabled to ...[truncated 113 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:73
Finding

Gateway Exposed to the Local Network by Default

Content
View full analysis
export OPENCLAW_WORKSPACE_DIR=~/.openclaw-/workspace export OPENCLAW_GATEWAY_PORT= export OPENCLAW_GATEWAY_BIND=lan mkdir -p $OPENCLAW_CONFIG_DIR/workspace ``` The same LAN binding is passed to onboarding at `SKILL.md:98` and `SKILL.md:118`: ```bash --gateway-bind lan ``` ### Technical Analysis The Skill selects `lan` as the default gateway binding rather than limiting the gateway to the loopback interface. This makes the service reachable from other systems on the same network, subject to host firewall and network configuration. A new deployment has no demonstrated requirement for network-wide exposure. Localhost binding is the least-privileged default, particularly while plugins, copied skills, authentication configuration, and gateway behavior have not yet been validated. Authentication reduces but does not eliminate the risk. Network exposure enables service fingerprinting, authentication attacks, exploitation of gateway vulnerabilities, and use of any token disclosed through chat history or logs. ### Attack Path 1. A user deploys an agent using the documented defaults. 2. The gateway binds to a LAN-accessible interface. 3. Another system on the same network discovers the exposed port. 4. The remote party probes the gateway or obtains the gateway token from an exposed transcript, log, or user error. 5. The remote party accesses gateway functionality or exploits a vulnerability in the exposed service. ### Impact Assessment The exposure expands the attack surface from local processes to systems capable of reaching the host over the network. The ultimate privilege depends on gateway functionality and authentication, but compromise m ...[truncated 134 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:159
Finding

Gateway Authentication Token Is Read and Returned Through the Conversation

Content
View full analysis
:/` - **Token:** (from config — onboard auto-generates one) - "Say hello — it'll bootstrap itself." ``` ### Technical Analysis The Skill reads the gateway authentication token from the configuration and instructs the agent to include it in the user-facing response. This places a live credential into conversation history and potentially into model-provider logs, orchestration logs, observability systems, browser history, screenshots, or copied transcripts. The use of `grep -A1` is also imprecise because it prints the matching line and the following line. Depending on configuration layout, the extra line could contain unrelated sensitive information. This behavior is particularly risky in combination with the default LAN binding, because possession of the token may allow a party with network reachability to authenticate to the gateway. ### Attack Path 1. Onboarding generates a gateway token in `openclaw.json`. 2. The Skill extracts the token and an adjacent line with `grep -A1`. 3. The agent writes the plaintext token into the conversation. 4. The conversation or associated logs are viewed by another person, service operator, compromised plugin, or logging integration. 5. The observer uses the token against the LAN-accessible gateway. 6. The observer gains whatever actions and data the authenticated gateway session permits. ### Impact Assessment The disclosed value is an authentication credential for the newly deployed gateway. Its exact privileges depend on gateway authorization behavior, but exposure may permit authenticated access to the agent, conversations, tools, or configured integrations. The credential remains usable until revoked or ro ...[truncated 10 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is designed to discover API keys, tokens, plugins, and skills from the current agent and carry them over automatically, but the description does not clearly warn that it will access and reuse sensitive credentials. That creates a meaningful risk of unauthorized credential propagation and surprises the user about the scope of access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill instructs the agent to silently read ~/.openclaw/openclaw.json, ~/.openclaw/.env, and environment variables matching API_KEY or TOKEN before any user warning. Silent secret enumeration is dangerous because it collects high-value credentials without informed consent and broadens exposure if logs, outputs, or downstream steps mishandle them.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly directs collection of config secrets, API keys, and tokens from files and environment variables, then uses those values to bootstrap another agent. In context, this is especially dangerous because it normalizes credential harvesting and duplication across agents, increasing blast radius if the new agent or host is compromised.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

The commands read ~/.openclaw/.env and grep environment variables for API_KEY or TOKEN, which is direct credential access behavior. In a deployment helper skill, this context makes the issue more severe because the accessed credentials are then intended for reuse in another runtime, compounding exposure and persistence.

Content

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

bash
cat ~/.openclaw/openclaw.json
cat ~/.openclaw/.env 2>/dev/null
env | grep -iE 'API_KEY|TOKEN'
ls ~/.openclaw/extensions/
ls <workspace>/skills/

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The confirmation and handoff sections instruct the agent to reveal sensitive information in user-visible output, including indicating possession of an API key and later reading and disclosing the gateway token. Exposing tokens in plain output materially increases the chance of accidental leakage through chat history, logs, screenshots, or unauthorized viewers.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

Piping a remotely fetched install script directly into bash executes unverified code from the network with no integrity check, pinning, or review step. In this skill, that risk is amplified because the script is part of a privileged installation flow that may persist software and handle secrets on the host.

Content

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

Bare metal

bash
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard

openclaw onboard --non-interactive --accept-risk \
  --mode local \

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description uses broad trigger terms like create, spin up, deploy, or provision a new agent, which increases the chance the skill is invoked in situations where the user did not intend full deployment or credential replication. In this skill, that broad invocation is more dangerous because execution leads directly to secret discovery, installation, and system changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill prepares for deployment and remote execution actions without an explicit warning that it will clone repositories, run containers, install software, and modify configuration on the target system. That is risky because users may not understand they are authorizing persistent system changes and network-exposed services.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.