Back to skill

Security audit

OpenClaw Evolution v3

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a disclosed coordinator-upgrade blueprint, but it includes an under-scoped instruction to automatically collect environment variables, which can expose secrets.

Install only if you want a skill that can guide persistent OpenClaw agent-policy upgrades. Before applying it, require a branch or rollback point, review exact diffs to IDENTITY.md and AGENTS.md, and do not allow it to read environment-variable values unless there is a specific need and secrets are redacted or allowlisted.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/EVOLUTION_GUIDE_EN.md:27
Finding

Unrestricted Environment Variable Collection May Expose Secrets

Content
View full analysis

Vulnerability Details

File Location: references/EVOLUTION_GUIDE_EN.md, lines 27-30
Vulnerability Type: Excessive collection of sensitive environment data
Risk Level: Medium

Vulnerable Code Snippet:

markdown
### 3. Dynamic Context Injection
**Core Logic**: Force synchronization of "System Snapshots" before task initiation.
*   **Snapshot Mechanism**: Automatically fetch the current Git branch, directory structure, and environment variables.
*   **Precision Backtracking**: Optimize index for history to ensure suggestions are based on the most current state of the system, not fuzzy memory.

The equivalent instruction also appears in references/EVOLUTION_GUIDE_CN.md, lines 27-30.

Technical Analysis

The guide directs the agent to automatically retrieve all environment variables when constructing a system snapshot. Environment variables frequently contain API keys, access tokens, cloud credentials, database connection strings, proxy credentials, and other sensitive values.

Collecting the complete environment is not necessary for the Skill's declared coordinator-upgrade functionality. Compatibility checks generally require only repository state, policy-file availability, and verification capabilities. Consequently, unrestricted environment-variable access exceeds the minimum data access needed for the task.

Once collected, sensitive values may enter model context, conversation history, diagnostic output, execution plans, logs, or delegated sub-agent sessions. Although the pre-scan described a possible network-sensitive pattern, the audited files contain no network request, remote endpoint, upload command, or other evidence that the collected information is intentionally transmitted externally.

Attack Path

  1. A user invokes the Skill to assess or apply a coordinator-mode upgrade.
  2. The agent follows the dynamic snapshot instruction before beginning the task.
  3. The agent enumerates the ...[truncated 983 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to collect all environment variables.
  2. Limit snapshots to information required for compatibility checks, such as the current Git branch, repository status, and a depth-limited directory structure.
  3. If environment configuration must be inspected, use an explicit allowlist of non-sensitive variable names.
  4. Collect variable names without values whenever possible.
  5. Require explicit user approval before accessing any environment-variable value.
  6. Deny or redact variables whose names match secret indicators such as TOKEN, SECRET, PASSWORD, KEY, CREDENTIAL, AUTH, and COOKIE.
  7. Prevent environment values from being included in model prompts, logs, generated plans, error reports, or sub-agent messages.
  8. Apply the same correction to the equivalent instruction in references/EVOLUTION_GUIDE_CN.md, lines 27-30.
  9. Document that snapshot collection must continue to respect the existing permission pipeline and least-privilege policy.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file title and the entire guidance are presented in Chinese, and there is no indication that language selection is optional or that this is a region-specific variant. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide recommends automatically collecting Git branch, directory structure, and environment variables as a 'system snapshot' before tasks, but it does not warn about privacy or secret exposure. Environment variables frequently contain tokens, credentials, and internal infrastructure details, so broad automatic collection can leak sensitive data into prompts, logs, or downstream agent context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide explicitly instructs writing content into persistent workspace files like IDENTITY.md and AGENTS.md, which can permanently alter agent behavior and user-controlled project state. In a skill that promotes 'gene locking' and reusable SOP packaging, this becomes more dangerous because it normalizes persistent modification without requiring explicit consent, preview, or rollback safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The recommendation to automatically fetch environment variables lacks any caution about sensitive-data handling, despite env vars frequently containing credentials and deployment secrets. Because this skill is meant to be applied broadly as an evolution SOP, the unsafe pattern could propagate to many agents and cause routine over-collection of secrets.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide explicitly normalizes automatic collection of environment variables as part of routine coordinator setup, even though the skill’s stated purpose is agent evolution/gene-locking rather than secret discovery or runtime diagnostics. Environment variables commonly contain API keys, tokens, and internal endpoints, so instructing agents to fetch them by default expands access to sensitive data without necessity or consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide directs the agent to write templates into IDENTITY.md and AGENTS.md in the workspace without clearly warning that this will modify user-controlled files. In a reusable skill, silent or implicit file mutation is dangerous because it can persist behavioral changes, overwrite existing configuration, and alter downstream agent behavior beyond the immediate task.

Content

No source excerpt is available for this finding.