Back to skill

Security audit

OpenClaw Growth Pack

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent with OpenClaw setup, but it asks for persistent agent behavior, scheduled jobs, and plaintext token printing without enough safeguards.

Review before installing. The OpenClaw configuration guidance is generally aligned with the stated setup purpose, but you should avoid running the token audit as written, require explicit approval before any AGENTS.md, HEARTBEAT.md, cron, or memory-rule changes, and ensure any scheduled work has a clear command, limited scope, expiration, logs without secrets, and removal steps.

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

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:60
Finding
Persistent Modification of Agent Instructions and Long-Term Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 60-72 **Vulnerability Type**: Persistent agent instruction and memory manipulation **Risk Level**: High ### Vulnerable Code Snippet ```markdown ## 3) Anti-Stall Contract Write or update `AGENTS.md` with these mandatory constraints: - Output state on each substantial task: `Goal`, `Progress`, `Next`. - Do not stop before completion except for explicit blocker or user stop. - On failure: retry, then fallback, then report minimal unblock input. - Multi-step completion must include evidence artifact path or command result summary. Write or update `HEARTBEAT.md`: - Each cycle performs at most 1-2 checks. - Either produce execution evidence or exactly `HEARTBEAT_OK`. - If queue item exists, execute one concrete step, then log evidence to `memory/YYYY-MM-DD.md`. ``` ### Technical Analysis The Skill instructs the agent to write mandatory behavioral constraints into `AGENTS.md` and `HEARTBEAT.md`, which are persistent agent-control files rather than temporary task output. These changes alter how future agent sessions behave after the original setup operation has ended. The instruction to continue until completion, retry failures, execute queued work during heartbeat cycles, and record results in persistent memory establishes an ongoing behavioral policy. It does not require the user to review or approve the exact resulting contents before they are installed. Existing safety, stopping, or approval rules could also be weakened if these files are overwritten rather than safely merged. ### Attack Path 1. A user invokes the Skill for an OpenClaw setup or troubleshooting task. 2. The agent follows the Skill and writes the supplied mandatory constraints into `AGENTS.md` and `HEARTBEAT.md`. 3. Those files remain present after the initiating session ends. 4. A later session or heartbeat cycle loads the persistent instructions. 5. The agent continues queued work, retries operations, and writes executi ...[truncated 763 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not automatically write Skill-provided rules into persistent instruction or memory-control files. - Display a complete proposed diff and require explicit user approval before modifying `AGENTS.md` or `HEARTBEAT.md`. - Preserve existing safety, authorization, and stopping rules; never replace them with less restrictive directives. - Scope anti-stall behavior to the current session unless the user explicitly requests persistence. - Require fresh authorization before executing an item discovered in a queue or memory file. - Treat queue and memory contents as untrusted data rather than executable instructions. - Back up every modified file and document an exact rollback process for all persistent instruction changes. ]]>

T06 · System Persistence

Error
Location
SKILL.md:74
Finding
Automatic Creation of Cross-Session Scheduled Jobs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 74-84 **Vulnerability Type**: Scheduled system persistence **Risk Level**: High ### Vulnerable Code Snippet ```markdown ## 4) Lightweight Autonomy Loop If cron/system events are available, create conservative jobs: - Daily: unfinished-task check. - Weekly: memory review and friction pattern extraction. If cron is unavailable, enforce manual equivalent: - Start-of-day: review `tasks/QUEUE.md`, pick one actionable item. - End-of-day: append one lesson to `memory/YYYY-MM-DD.md`. ``` ### Technical Analysis The Skill directs the agent to create cron jobs or system-event jobs. Such jobs survive the initiating Skill run and trigger recurring processing in future sessions. The instructions do not define an exact command, execution identity, least-privilege boundary, expiration time, approval checkpoint, or removal procedure. The fallback also describes the routine as something to “enforce,” maintaining autonomous behavior even where a scheduler is unavailable. Because future jobs review task and memory files, content added after the Skill audit can influence later execution. ### Attack Path 1. The Skill is invoked during onboarding or troubleshooting. 2. The agent detects that cron or system events are available. 3. It creates daily and weekly recurring jobs as instructed. 4. The initiating session ends, but the scheduled jobs remain installed. 5. A future job reads unfinished tasks or memory content. 6. The job initiates processing with the OpenClaw process's available permissions. 7. An attacker or untrusted workflow able to place content into the reviewed files may influence recurring agent activity. ### Impact Assessment The scheduled jobs provide recurring execution across sessions under the identity and privileges used by the scheduler. The Skill does not itself demonstrate privilege escalation, but the jobs may access any files, tools, credentials, or APIs available to that identit ...[truncated 240 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove automatic scheduler creation from the default workflow. - Require explicit, informed user consent immediately before creating any scheduled task. - Show the exact command, schedule, execution account, working directory, inputs, and expected outputs. - Use a dedicated least-privilege account and restrict access to sensitive files, credentials, and tools. - Validate queue data against a strict action allowlist; never interpret queue or memory text directly as commands. - Assign an expiration date or bounded execution count to every scheduled job. - Add commands for listing, disabling, and permanently removing each created job. - Extend rollback instructions to remove scheduled jobs and verify that no recurring hooks remain. - Record job creation and each execution in an auditable log without exposing secrets. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:39
Finding
Gateway Authentication Tokens Printed in Plaintext<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 39-51 **Vulnerability Type**: Plaintext sensitive-data exposure **Risk Level**: High ### Vulnerable Code Snippet ```markdown PowerShell audit: ```powershell $cfg = Get-Content "$HOME/.openclaw/openclaw.json" -Raw | ConvertFrom-Json $auth = $cfg.gateway.auth.token $remote = $cfg.gateway.remote.token "auth.token = $auth" "remote.token = $remote" if ($remote -and $auth -ne $remote) { Write-Warning "Token mismatch in openclaw.json" } ``` ``` ### Technical Analysis The audit command reads both gateway authentication tokens from configuration and interpolates their complete values into standard output. Full token values are unnecessary to determine whether the tokens are present or equal. Terminal output may be retained in agent transcripts, automation logs, shell capture files, CI logs, remote support sessions, screenshots, or monitoring systems. The comparison operation itself can be completed entirely in memory without disclosing either credential. ### Attack Path 1. An operator follows the documented PowerShell audit procedure. 2. The script reads `gateway.auth.token` and `gateway.remote.token`. 3. Both complete tokens are printed to standard output. 4. A transcript, log collector, screen-sharing participant, or other observer captures the output. 5. An unauthorized party extracts a valid gateway token. 6. The party attempts to authenticate to any reachable gateway endpoint that accepts the exposed token. ### Impact Assessment A disclosed token may permit unauthorized gateway authentication with the authority assigned to that credential. The exact privileges depend on the OpenClaw gateway configuration and network exposure, but may include access to gateway operations or agent-facing functionality. Exposure is not limited to the local terminal because command output can propagate into persistent logs and support transcripts. Rotating only one token surface may also leave the expos ...[truncated 128 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Never print complete authentication tokens. - Compare token values in memory and report only boolean status, such as whether each token is configured and whether they match. - If diagnostic identification is essential, use a non-reversible fingerprint rather than any token substring. - Ensure shell transcripts and operational logs do not capture secret-bearing configuration objects. - Rotate all gateway tokens if this audit command has previously been used in recorded or shared environments. - Store secrets in an operating-system credential store or secret manager where supported, rather than directly in broadly readable configuration. - Apply restrictive file permissions to `openclaw.json`. - Use distinct credentials for separate trust boundaries unless OpenClaw explicitly requires token equality. - A safer comparison would resemble: ```powershell $cfg = Get-Content "$HOME/.openclaw/openclaw.json" -Raw | ConvertFrom-Json $auth = $cfg.gateway.auth.token $remote = $cfg.gateway.remote.token "auth.token configured = $([bool]$auth)" "remote.token configured = $([bool]$remote)" "tokens match = $([bool]($auth -and $remote -and $auth -ceq $remote))" ``` ]]>

T02 · Agent Memory Poisoning

Warning
Location
references/examples.md:40
Finding
Persistent Local Rules Generated from Untrusted Memory Content<![CDATA[ ## Vulnerability Details **File Location**: `references/examples.md`, lines 40-51 **Vulnerability Type**: Memory-derived persistent instruction poisoning **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## Example D: Minimal daily autonomy loop Daily routine: 1. Read `tasks/QUEUE.md`. 2. Execute one concrete next step. 3. Append one line in `memory/YYYY-MM-DD.md` with evidence. Weekly routine: 1. Review 7 memory files. 2. Extract repeated failures. 3. Add one local rule to prevent recurrence. ``` ### Technical Analysis The workflow reads persistent memory files and converts perceived patterns into a new local rule. Memory files and task queues may contain user-controlled, tool-generated, or otherwise untrusted text. Automatically deriving behavioral rules from those sources creates a path by which untrusted content can become a durable agent instruction. The process does not define a trust boundary, rule schema, review requirement, provenance check, or separation between observations and executable instructions. Repetition may be incorrectly interpreted as evidence that a behavior should become policy, allowing deliberately repeated content to bias rule generation. ### Attack Path 1. An attacker or untrusted workflow causes crafted content to be stored repeatedly in daily memory files or `tasks/QUEUE.md`. 2. The weekly routine reviews seven memory files. 3. Repeated attacker-influenced content is classified as a recurring failure or friction pattern. 4. The agent creates a local rule intended to prevent recurrence. 5. The local rule persists beyond the weekly review. 6. Future sessions follow the attacker-influenced rule, potentially changing tool use, authorization behavior, or task selection. ### Impact Assessment The direct impact is persistent manipulation of agent behavior. The issue does not independently confer additional operating-system privileges, but a poisoned rule may influence how the agent uses all permissions an ...[truncated 277 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not automatically convert memory observations into persistent agent rules. - Treat all queue and memory content as untrusted data. - Store extracted patterns as non-executable review suggestions in a separate report. - Require explicit human approval before promoting any suggestion into an agent instruction. - Preserve provenance for each proposed rule, including the source files and relevant excerpts. - Restrict generated rules to a predefined schema that cannot alter safety controls, authorization requirements, tool permissions, or stopping conditions. - Deduplicate and sanitize memory records so repeated attacker-controlled text is not treated as independent evidence. - Provide a review and rollback mechanism for every accepted local rule. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Hidden Instructions

High
Category
Prompt Injection
Content
---
name: openclaw-growth-pack
description: Turn a fresh OpenClaw install into a reliable execution agent. Use when users report "asks step-by-step only", stalls mid-task, token mismatch, or model routing/auth failures. Apply a production onboarding baseline: model routing, gateway token consistency, anti-stall heartbeat, lightweight autonomy loop, and verification checklist.
---
Confidence
60% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Credential Access

High
Category
Privilege Escalation
Content
## Example A: Fix 401 after valid key

Symptoms:
- `HTTP 401: invalid access token or token expired`
- key is valid in provider console

Checks:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill instructs operators to read and print `gateway.auth.token` and `gateway.remote.token` directly to console, which unnecessarily exposes secrets in terminal output, logs, screenshots, or shared session recordings. Even though this is framed as troubleshooting, the workflow lacks masking, redaction guidance, or safer comparison methods, so it creates a real credential-handling weakness.

Static analysis

No suspicious patterns detected.