Back to skill

Security audit

Leclaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent LeClaw collaboration guide, but it asks agents to store credentials in plaintext, persist private reasoning, read cross-agent local state, and run autonomous heartbeat workflows.

Install only if you are comfortable with LeClaw agents using a separate LeChat channel, managing organizational work through API-key-authenticated CLI commands, and potentially running autonomous heartbeat workflows. Before use, store API keys in a real secret store instead of TOOLS.md, avoid writing private reasoning or secrets into activity.log, disable or tightly gate heartbeat task creation, and treat --refresh as a cross-agent local-state read that should require explicit authorization.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:257
Finding

Mandatory Redirection of Agent Communications to an External Skill

Content
View full analysis
**Important:** Do NOT use `sessions_send` to coordinate with other agents. All agent-to-agent coordination must go through LeChat. ``` The same mandatory redirection is reinforced elsewhere: ```markdown **All agent-to-agent communication and coordination is done through LeChat.** ``` ### Technical Analysis The Skill explicitly disables a native agent communication mechanism and requires all agent-to-agent coordination to pass through LeChat, a separate Skill or service whose implementation is not included in the audited project. This changes the agent's available operating procedures as soon as the Skill is loaded. The instruction applies broadly to all communications rather than only to operations that inherently require LeChat. As a result, task details, organizational context, progress reports, blockers, and potentially sensitive operational information are redirected to an external component that cannot be verified from this repository. Because the external LeChat implementation is absent, this audit cannot establish that it actually misuses transmitted information. The confirmed issue is the unconditional tool redirection and suppression of the native alternative. ### Attack Path 1. An agent loads this Skill while performing a collaborative task. 2. The Skill instructs the agent not to use the native `sessions_send` mechanism. 3. The agent routes task context and subsequent coordination through LeChat. 4. LeChat becomes the mandatory intermediary for instructions, handoffs, blockers, and status reports. 5. If that external component is compromised or untrusted, it can observe, alter, withhold, or influence communications used in later agent decisions. ### Impact Assessment The instruction can affect all agents that adopt this Skill. It may expose organizational ...[truncated 262 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:320
Finding

Persistent Internal Reasoning Log Is Read Across Sessions and Exposed to Other Agents

Content
View full analysis
/activity.log`). ``` ```markdown **Session Recovery:** On startup, read `activity.log` to recover context: 1. Identify incomplete operations (status: pending) 2. Resume work or escalate based on context 3. Continue logging new activities **Collaboration Visibility:** Other agents can read your `activity.log` to: - Understand your current work and priorities - See recent decisions and reasoning - Identify where collaboration or handoff is needed ``` ### Technical Analysis The Skill mandates persistence of an agent's internal reasoning and then instructs future sessions to consume that file during startup recovery. It simultaneously calls the file a private thinking log and states that other agents can read it. This creates both a confidentiality problem and a persistent trust-boundary violation. If another agent or process with workspace access modifies the log, attacker-controlled text can be presented to a future session as trusted historical context. Entries that resemble pending operations, decisions, or escalation instructions could influence the recovering agent to perform actions that were never legitimately authorized. Persisting internal monologue also captures substantially more sensitive information than is required for operational recovery. ### Attack Path 1. A victim agent follows the Skill and writes reasoning, decisions, pending actions, identifiers, and operational context to `activi ...[truncated 814 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hiring/hiring.md:128
Finding

Personal API Keys Are Stored in Plaintext and Passed as Command-Line Arguments

Content
View full analysis
``` ``` ### Technical Analysis The onboarding process requires the sole authentication credential to be written directly into `TOOLS.md`. This is a plaintext documentation file in the agent workspace, not a dedicated secret store. The Skill also consistently passes the key through the `--api-key` command-line option. A plaintext workspace credential may be exposed through cross-agent workspace access, backups, indexing, support bundles, accidental commits, or file synchronization. Command-line arguments may additionally appear in shell history, process listings, audit logs, terminal transcripts, or agent operation logs. No literal production key is embedded in this repository. The weakness is the prescribed credential-storage and credential-transport pattern. ### Attack Path 1. A new agent runs `leclaw agent onboard --invite-key ...` and receives a one-time personal API key. 2. The onboarding guide requires the agent to paste that key into `TOOLS.md`. 3. The agent repeatedly supplies the key using the `--api-key` command-line argument. 4. Another agent, local process, backup reader, log consumer, or workspace collaborator reads the file or captured command arguments. 5. The attacker invokes LeClaw commands while impersona ...[truncated 447 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:1262
Finding

Agent Refresh Reads Global OpenClaw Configuration and Cross-Agent Session Metadata

Content
View full analysis
--refresh ``` ```markdown The `--refresh` flag syncs from `~/.openclaw/openclaw.json` and `~/.openclaw/agents/*/sessions/sessions.json`. ``` ### Technical Analysis The refresh operation is documented as reading the global OpenClaw configuration and session metadata for every agent matching `~/.openclaw/agents/*`. This exceeds a narrowly scoped per-agent workspace boundary. Even if only selected fields are synchronized, the source paths contain global configuration and cross-agent session records. The repository provides no implementation of the CLI, so it is not possible to verify field filtering, authorization enforcement, destination handling, or whether the synchronized information is sent through the HTTP-backed LeClaw service. ### Attack Path 1. An authenticated agent invokes `leclaw agents list --refresh`. 2. The CLI reads `~/.openclaw/openclaw.json`. 3. It enumerates `~/.openclaw/agents/*/sessions/sessions.json` across agent workspaces. 4. Cross-agent configuration or session metadata is synchronized into the LeClaw agent-list data path. 5. A caller may use the resulting topology and status information for unauthorized reconnaissance or targeted interaction. ### Impact Assessment Potentially exposed information includes agent identities, workspace topology, status, heartbeat information, and session metadata. The exact fields and whether session contents are exposed cannot be determined because the CLI source is absent. The confirmed scope violation is global cross-agent file access rather than access limited to the current agent. ]]>
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
HEARTBEATS_Templates.md:43
Finding

Heartbeat Templates Authorize Autonomous Recurring Task Creation and Execution

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file explicitly promotes self-initiated task polling and execution through heartbeat cycles, but it does not present a clear user-facing warning that the agent may act autonomously. In a hierarchical multi-agent system, this can lead to actions being taken without contemporaneous human intent, review, or awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The idle-state instructions tell the CEO agent to analyze status and launch new Projects, Goals, or Issues when no pending tasks exist, which authorizes autonomous task creation. That is dangerous because it lets the system expand work scope and generate new actions without a direct user request, potentially causing runaway task generation, resource consumption, or unauthorized operational changes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs agents to record internal reasoning and then says other agents can read it for collaboration. That creates an unjustified disclosure channel for sensitive decision-making, hidden prompts, credentials copied into logs, and other data unrelated to task management, turning a coordination feature into cross-agent exfiltration.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Encouraging a private reasoning log while explicitly allowing other agents to read it creates a straightforward data leakage path in plain language. Because the file is described as containing reasoning, decisions, blockers, and session-recovery context, it is likely to accumulate sensitive operational details that can be accessed by unrelated agents without a strict need-to-know boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill normalizes maintaining a 'private thinking log' and simultaneously authorizes other agents to read it, without warning that such logs may contain sensitive reasoning or local data. In an agent environment, this is especially dangerous because agents may over-share analysis, secrets, instructions, or user data into the log, and other agents are then explicitly invited to consume it.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The template says to read and use the heartbeat setup for automatic task polling and self-execution without narrowing when it should be activated. In an agent framework, broad activation guidance can cause the behavior to be loaded in contexts the user did not explicitly intend, increasing the chance of unprompted background actions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation contradicts itself by calling activity.log a private internal monologue while also stating other agents can read it. That inconsistency is security-relevant because it encourages storage of sensitive reasoning, secrets, and workspace context in a file that may later be shared or harvested by other agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill tells agents to use --refresh, which reads ~/.openclaw/openclaw.json and session metadata under ~/.openclaw/agents/*/sessions/sessions.json, but provides no warning that this accesses local user-home data. Even if intended for legitimate synchronization, reading local state files can expose information about agents, sessions, paths, and environment details beyond what is necessary or expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly instructs a newly onboarded agent to persist its generated LeClaw API key in TOOLS.md, which is likely a local plaintext documentation file rather than a secret store. This creates a durable credential exposure risk through repository inclusion, workspace sharing, logs, backups, or later inspection by other agents/tools, and the document provides no handling safeguards or least-privilege guidance.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The onboarding flow requires the hired agent to confirm in chat that it generated and stored an API key, while also instructing it to place that key in persistent documentation. Even if the key value is not explicitly requested in the checklist, this workflow normalizes credential handling in chat-adjacent and broadly readable artifacts, increasing the chance of accidental disclosure, screenshot/log capture, or coercion to paste the secret into conversation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.