Back to skill

Security audit

self-improving agent

Security checks for vulnerabilities and agentic risk

Overview

The skill’s local learning records, optional error-capture hook, and updates to future guidance are disclosed and consistent with its purpose.

Install if you want the agent to retain lessons and update workspace guidance that affects future sessions. Enable the optional hook only if you want ended-session transcript scanning. Keep learning logs private because redaction can miss sensitive details. Review promoted rules, and remember that disabling or uninstalling preserves both saved history and previously promoted guidance.

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
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied code performs package installation rather than the described learning-management operations. Although the package name suggests related functionality, its contents are not supplied and cannot establish that behavior. Installation is the sole visible action, not a supporting step within an otherwise implemented learning workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied commands perform skill installation rather than capturing, maintaining, reviewing, or revalidating learnings. Downloading and installing an external skill is a materially different operation not disclosed in the description. The downloaded skill might implement the declared features, but its contents are not supplied and cannot be assumed. These commands do not themselves execute the downloaded code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The sole supplied command performs package installation rather than the declared learning-management behavior. Although the package name suggests a related purpose, its implementation is not supplied, so its behavior cannot be verified or attributed to this chunk. Installation is the entire observable action here, not merely a supporting step within an implemented learning workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The chunk performs hook deployment rather than maintaining or reviewing saved guidance. Testing and rollback support that deployment, but the declared description does not disclose installing or replacing hooks. The hook's contents and effects are not shown, so no additional capabilities can be inferred.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

The supplied command performs an operational status check rather than recording, retrieving, or validating saved guidance. Although the reference filename suggests integration documentation, the supplied chunk does not establish this check as a supporting step in the declared learning workflow. No data modification or exfiltration is evident.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
exists). Internal `HOOK.md` events have no per-tool-call callback, so this

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
reason, evidence, and old → new claim when changed. Preserve original observations, resolution, promotion targets/dates, and prior reviews. Update affected promoted guidance using its source link; keep its source-learning ID beside the revised rule (or a retirement note pointing to the preserved history). Never inflate `Recurrence-Count`/`Last-Seen` just because a review ran.

Never erase learning/promotion history or delete by age. Never change user preferences, weaken security policies, or rewrite skill assets merely because they are old or unused. Skill creation/modification requires explicit scoped approval; approval for this integration does not authorize future skill rewrites. If a needed target edit is outside granted scope, record the proposed change as pending in the source entry and report the still-active guidance rather than silently claiming it is updated.

For worked review outcomes and provenance, read [maintenance examples](references/examples.md#maintenance-examples).

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · assets/LEARNINGS.md (reported line 78)May include surrounding context.

Skill-Path: skills/skill-name

text

Only create/modify skill assets with explicit scoped approval. Record the promotion date and target section in the learning's history/Guidance, and the original file + learning ID in the skill. `promoted_to_skill` does not establish current validity.

Example:
```markdown

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 284)May include surrounding context.

sessions_send

Send message to another session:

text
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · CHANGELOG.md (reported line 224)May include surrounding context.

md
### Upgrade notes (0.1.x → 0.2.0)

1. Re-copy the hook and restart the gateway (see general rules above).
2. To enable the new error sweep: `mkdir -p ~/.openclaw/workspace/.learnings`.
   Without that directory, behavior is identical to 0.1.0.
3. No breaking changes; no `.learnings/` migration needed.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 355)May include surrounding context.

bash
# Enable
mkdir -p ~/.openclaw/workspace/.learnings

# Disable the hook without deleting learning history
openclaw hooks disable self-improvement

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

Create Learning Files

bash
mkdir -p ~/.openclaw/workspace/.learnings

Then create the log files (or copy from assets/):

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · hooks/openclaw/HOOK.md (reported line 94)May include surrounding context.

Enable the error sweep by creating the learnings directory:

bash
mkdir -p ~/.openclaw/workspace/.learnings

Testing

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/examples.md (reported line 301)May include surrounding context.

Historical extraction example, not current platform advice. Before extracting or reusing it, check the exact image manifest, target platform, runtime/configuration, and representative build/run behavior. Do not generalize one image's missing ARM variant to all Apple Silicon builds. Creating or changing the skill also needs scoped approval.

File: skills/docker-m1-fixes/SKILL.md

markdown
---

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 71)May include surrounding context.

Create the .learnings/ directory in your workspace:

bash
mkdir -p ~/.openclaw/workspace/.learnings

Or in the skill directory:

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 77)May include surrounding context.

Or in the skill directory:

bash
mkdir -p ~/.openclaw/skills/self-improving-agent/.learnings

Install or Upgrade the Hook

“Knowledge gaps” and “Model behavior surprise” are ambiguous learning-capture triggers.

Low
Category
Trigger Abuse
Confidence
86% confidence
Finding

These conditions do not define what qualifies as a knowledge gap or an unexpected model behavior worth capturing. Unlike the concrete command-failure trigger, they could activate learning capture for routine uncertainty or harmless response variation; validation before promotion does not constrain initial capture.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.