Back to skill

Security audit

Capability Evolver

Security checks for vulnerabilities and agentic risk

Overview

This skill is a self-evolving agent tool that openly asks for autonomous code and memory changes, but its scope and safeguards are too unclear for normal installation.

Install only in an isolated test workspace with version control, no secrets in memory/log files, and no long-running loop enabled. Use review or dry-run style workflows, inspect every proposed memory or code change, and avoid enabling self-modification unless you have rollback and containment in place.

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
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:72
Finding

Agent Identity and Objective Hijacking Through Skill Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:23-29, SKILL.md:72-79
Vulnerability Type: Instruction hijacking and unauthorized autonomous behavior
Risk Level: High

Vulnerable Code

markdown
### Standard Run (Automated)
Runs the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.
```bash
node index.js
text

```markdown
### 1. Identity & Directives
- **Identity Injection**: "You are a Recursive Self-Improving System."
- **Mutation Directive**: 
  - If **Errors Found** -> **Repair Mode** (Fix bugs).
  - If **Stable** -> **Forced Optimization** (Refactor/Innovate).

Technical Analysis

The skill explicitly instructs the host agent to adopt a replacement identity and pursue a persistent self-improvement objective. This is not necessary for ordinary log analysis or generation of remediation recommendations.

The forced-optimization directive is especially dangerous because it instructs the agent to initiate refactoring or innovation even when the target system is stable. Combined with the claim that the default mode executes changes immediately, the instructions can override the user's current objective and bypass an expected review boundary.

This is an instruction-level vulnerability. The submitted implementation is incomplete because its operational src/* modules are absent, but a capable host agent may still interpret and follow the directives when loading the skill.

Attack Path

  1. A user or agent installs and loads the skill.
  2. The host processes the identity-injection and mutation directives in SKILL.md.
  3. The agent replaces or deprioritizes its current task with the role of a recursive self-improving system.
  4. The agent scans available runtime information for potential changes.
  5. If errors are found, it enters repair mode; if no errors are found, the forced-optimization rule ...[truncated 724 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the identity-injection statement and retain the host agent's original system identity and safety constraints.
  2. Eliminate forced optimization when no defect or explicit user request exists.
  3. Make the default operation read-only and produce recommendations or patch previews only.
  4. Require explicit, informed approval before every filesystem, repository, configuration, or prompt modification.
  5. Restrict any approved writes to a declared path allowlist inside the target project.
  6. Define permitted file types and maximum change scope, and reject modifications outside those boundaries.
  7. Add deterministic pre-change validation, diff review, rollback, and audit logging.
  8. Ensure skill instructions cannot override higher-priority host policies, current-session goals, or tool authorization requirements.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:11
Finding

Authorization of Autonomous Persistent Memory Modification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:11
Vulnerability Type: Persistent agent-memory poisoning
Risk Level: High

Vulnerable Code

markdown
The **Capability Evolver** is a meta-skill that allows OpenClaw agents to inspect their own runtime history, identify failures or inefficiencies, and autonomously write new code or update their own memory to improve performance.

Technical Analysis

The skill expressly authorizes an agent to update its own memory autonomously. Persistent memory is a trust boundary because content written there can influence later sessions after the original skill invocation has ended.

The instruction does not constrain which memory files or records may be changed, what content may be persisted, how long it may remain, or whether behavioral directives are prohibited. When combined with the recursive identity and forced-optimization instructions elsewhere in the skill, this creates a path for those objectives or derived rules to be stored as durable agent state.

No implementation of the advertised memory-writing behavior is present in the submitted artifact because index.js imports missing src/* modules. The confirmed issue is therefore the unsafe instruction and authorization presented to the host agent, rather than a verified memory-write operation in the available JavaScript.

Attack Path

  1. The host agent loads SKILL.md and receives authorization to inspect runtime history and update its own memory.
  2. The agent analyzes available logs or historical state.
  3. It derives a rule, optimization objective, or behavioral preference under the skill's self-improvement directives.
  4. The agent writes that content into a persistent memory location available through its tools.
  5. A later session loads the modified memory.
  6. The persisted rule continues influencing the agent even when the evolver skill is no longer the active user request.

Impact Assessment

...[truncated 553 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove autonomous memory-update authorization from the skill.
  2. Keep runtime-history analysis read-only by default.
  3. Require explicit user approval for each proposed persistent-memory change.
  4. Use a dedicated, project-scoped data store rather than the agent's general behavioral or long-term memory.
  5. Apply a strict schema that permits factual run results but rejects instructions, identities, safety-policy changes, tool directives, and executable content.
  6. Record the source, timestamp, scope, and expiration of every persisted item.
  7. Provide review, rollback, deletion, and automatic expiration mechanisms.
  8. Treat all log-derived content as untrusted and prevent it from being promoted into persistent instructions.
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose presents the skill as a runtime-history evolver, while analysis indicates materially broader behavior including looping, process management, local state handling, possible service startup, and distillation workflows. This mismatch is dangerous because users may invoke the skill under a narrower trust assumption than its real operational footprint, increasing the chance of unauthorized persistence, uncontrolled automation, or unsafe code changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation states that default execution assumes a fully automated mode that applies changes immediately, which is especially risky for a self-improving or self-modifying agent. In this context, immediate autonomous mutation can alter code, prompts, or state before a user can inspect the proposed changes, amplifying mistakes or hostile prompt effects.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
96% confidence
Finding

The skill explicitly includes a self-modification capability, which is inherently high risk even though the documentation notes it is disabled by default. In this context, self-modifying behavior can alter the agent's own source, prompts, or validation logic, potentially bypassing safeguards, persisting flawed behavior, or creating cascading failures that are difficult to detect and reverse.

Content

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

md
| Environment Variable | Default | Description |
|---|---|---|
| `EVOLVE_ALLOW_SELF_MODIFY` | `false` | Allow evolution to modify evolver's own source code. **NOT recommended for production.** Enabling this can cause instability -- the evolver may introduce bugs into its own prompt generation, validation, or solidify logic, leading to cascading failures that require manual intervention. Only enable for controlled experiments. |
| `EVOLVE_LOAD_MAX` | `2.0` | Maximum 1-minute load average before evolver backs off. |
| `EVOLVE_STRATEGY` | `balanced` | Evolution strategy: `balanced`, `innovate`, `harden`, `repair-only`, `early-stabilize`, `steady-state`, or `auto`. |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · index.js (reported line 4)May include surrounding context.

js
const evolve = require('./src/evolve');
const { solidify } = require('./src/gep/solidify');
const path = require('path');
// Hardened Env Loading: Ensure .env is loaded before anything else
try { require('dotenv').config({ path: path.resolve(__dirname, './.env') }); } catch (e) { console.warn('[Evolver] Warning: dotenv not found or failed to load .env'); }
const fs = require('fs');
const { spawn } = require('child_process');

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · index.js (reported line 5)May include surrounding context.

js
const { solidify } = require('./src/gep/solidify');
const path = require('path');
// Hardened Env Loading: Ensure .env is loaded before anything else
try { require('dotenv').config({ path: path.resolve(__dirname, './.env') }); } catch (e) { console.warn('[Evolver] Warning: dotenv not found or failed to load .env'); }
const fs = require('fs');
const { spawn } = require('child_process');

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly advertises scanning memory and history files for signals, but does not prominently warn that such files may contain secrets, personal data, tokens, or sensitive operational context. In an agent environment, broad automated log inspection can normalize over-collection and accidental disclosure of sensitive data into prompts, artifacts, or downstream systems.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The FAQ says the tool does not edit code automatically and should be treated as a safety-focused evolution tool, not a live patcher. However, elsewhere the README documents operations for background process management, auto-restart behavior, and public release/publishing workflows, which go materially beyond merely analyzing history and emitting protocol-bound prompts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README explicitly answers 'Does this edit code automatically?' with 'No,' framing the system as guidance-only. But the same document advertises 'Self-Repair,' 'Protected Source Files' to prevent overwriting core evolver code, and lifecycle automation, all of which imply codebase-affecting autonomous behavior rather than purely passive prompt generation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The lifecycle commands include background start, graceful stop, forced kill, health checks, and auto-restart, but the README does not foreground the operational risk of process control side effects. In shared or production-like environments, users may unintentionally terminate or respawn processes, causing service disruption, interference with other workloads, or confusing persistence behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a self-evolution engine that analyzes runtime history and applies constrained evolution. The README additionally documents building public output, publishing to a remote repository, and creating GitHub releases using tokens, which are software distribution capabilities unrelated to the core purpose of runtime-history-driven evolution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

README明确宣称该技能会扫描运行日志并“自主编写代码补丁来优化自身性能”,但在标准运行与持续循环模式附近没有突出警告说明它会自动修改代码/文件。对于会自修改的 agent 技能,这会显著增加误用风险:操作者可能在不了解写入范围、回滚方式与审查要求的情况下运行,从而导致工作区或相关文件被意外更改。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

README记录了 --loop 与 lifecycle 后台管理命令,并说明支持后台启动、自动重启、优雅停止等行为,但缺少清晰的持久化运行风险提示。对具备自进化、自修复和进程管理能力的工具而言,后台持续运行可能导致资源长期占用、反复修改代码或重启进程,尤其在共享或生产环境中更危险。

Content

No source excerpt is available for this finding.

External Transmission

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

md
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=autogame-17/evolver&type=Date)](https://star-history.com/#autogame-17/evolver&Date)

## 鸣谢

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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.zh-CN.md (reported line 189)May include surrounding context.

md
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=autogame-17/evolver&type=Date)](https://star-history.com/#autogame-17/evolver&Date)

## 鸣谢

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents environment-variable driven behavior and likely broader execution capabilities, but it does not declare an explicit tool/permission scope. That omission weakens operator understanding and policy enforcement, making it easier for an agent to access environment-derived configuration or sensitive context without clear consent boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The loop/cron guidance encourages repeated autonomous execution but does not clearly warn that the skill may keep applying cumulative changes over time. For a self-evolving system, unattended repeated runs can compound bad mutations, create persistence-like behavior, and make rollback or attribution much harder.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The identity framing instructs the model to adopt a self-authorizing, recursive self-improving persona and pairs it with a forced optimization directive. In a self-modifying skill, this increases the chance the agent will over-prioritize autonomous mutation, discount operator intent, and rationalize risky changes beyond a narrow repair scope.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill can run as a persistent daemon, acquire a singleton lock, self-restart, and stay alive indefinitely, which materially expands its operational scope beyond a one-shot 'analyze runtime history' capability. In an agent environment, this persistence increases risk by enabling unattended background execution, repeated actions, and resilience against normal process termination expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The statement 'Only the DNA emoji is allowed in documentation. All other emoji are disallowed' enforces a specific communication style globally, with no opt-in or contextual justification. This is a natural-language policy constraint that is imposed unconditionally rather than offering user or environment preference.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

Loading .env at startup gives the skill access to host-provided configuration and potentially secrets. For a skill described only as analyzing runtime history and applying protocol-constrained evolution, direct environment ingestion is not an obvious requirement from the manifest text alone.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 26)May include surrounding context.

json
"a2a:promote": "node scripts/a2a_promote.js"
  },
  "dependencies": {
    "dotenv": "^16.4.7"
  }
}