Back to skill

Security audit

Lovefromio Self Improving Agent

Security checks for vulnerabilities and agentic risk

Overview

This self-improvement skill is understandable, but it asks agents to persist and promote session-derived content into future agent instructions with broad optional hooks and limited guardrails.

Install only if you want persistent self-improvement memory. Keep hooks project-scoped when possible, avoid user-global hooks, do not store secrets or raw transcripts in .learnings, and require human review before promoting anything into CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or Copilot instructions.

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
hooks/openclaw/handler.js:48
Finding

Automatic Hook-Based Injection of Skill Instructions into Agent Context

Content
View full analysis
After completing this task, evaluate if extractable knowledge emerged: - Non-obvious solution discovered through investigation? - Workaround for unexpected behavior? - Project-specific pattern learned? - Error required debugging to resolve? If yes: Log to .learnings/ using the self-improvement skill format. If high-value (recurring, broadly applicable): Consider skill extraction. EOF ``` ### Technical Analysis The OpenClaw handler adds a skill-controlled virtual file directly to `event.context.bootstrapFiles`. This causes the reminder to enter the model's trusted bootstrap context whenever the ...[truncated 2305 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:439
Finding

Untrusted Conversation and Tool-Derived Content Can Be Promoted into Persistent Agent Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description describes a reflective/improvement-oriented skill that captures failures, user corrections, outdated knowledge, and recurring better practices. The supplied code does something materially different: it creates a new skill scaffold on disk under ./skills (or a specified relative output directory) and writes a template SKILL.md file. While the script mentions creating a skill from a learning entry and includes placeholders referencing a learning ID, it does not actually capture learnings, log errors/corrections, review prior learnings, or implement the described triggers. Its primary purpose is file/directory generation for skill extraction, which is a distinct capability not represented by the declared purpose.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The inter-session guidance explicitly encourages reading other sessions' transcripts and sending learnings across sessions, creating a direct pathway for cross-session disclosure of sensitive conversation content. In a system where sessions may have different scopes, users, or confidentiality expectations, this materially increases the risk of unauthorized data propagation.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
93% confidence
Finding

The guide instructs users to modify ~/.claude/settings.json, an agent configuration directory that affects behavior across sessions. Writing persistent command hooks into a global config is security-sensitive because it establishes automatic execution from a high-trust location; if the referenced script path is tampered with or the skill is installed from an untrusted source, every future session may inherit the behavior.

Content

Scanner excerpt · references/hooks-setup.md (reported line 48)May include surrounding context.

Option 2: User-Level Configuration

Add to ~/.claude/settings.json for global activation:

json
{

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 177)May include surrounding context.

sessions_send

Send message to another session:

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

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a self-improvement skill focused on capturing learnings, errors, corrections, and reviewing those learnings before major tasks. This script instead scaffolds entirely new skill directories and SKILL.md files under ./skills, which is a repository maintenance/code-generation function rather than the described learning-capture behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says to use the skill whenever a command fails, the user corrects the agent, a capability is missing, an external tool fails, knowledge is outdated, or a better approach is discovered. These conditions are extremely broad and cover a large share of ordinary agent interactions, without clear boundaries for when the skill should not activate.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

These instructions tell the agent to persist corrections, requests, and contextual details into long-lived markdown files, creating a durable record of natural-language inputs. If users provide secrets, proprietary information, or sensitive business context during normal interaction, that information could be retained and later disclosed to future sessions or collaborators.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

Creating persistent learning files under a user workspace introduces session persistence for conversational and operational data beyond the original interaction. Persistence is not inherently unsafe, but in this skill it amplifies the retention and later disclosure risks because the stored content is intended to be reviewed, promoted, and reused.

Content

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

└── FEATURE_REQUESTS.md

text

### Create Learning Files

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

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The templates explicitly request 'full context,' inputs, parameters, environment details, and user context, which strongly encourages copying potentially sensitive operational and conversational data into persistent files. That can capture credentials, tokens, internal paths, customer data, or proprietary workflow details that were only needed transiently for troubleshooting.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The automatic logging triggers are broad enough to fire on ordinary conversation, corrections, or exploratory discussion, which can cause unintended persistence of user content into reusable files. In a skill explicitly designed to retain and promote conversational learnings, overbroad triggers materially increase the risk of storing sensitive or irrelevant data without clear consent.

Content

No source excerpt is available for this finding.

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.

When the above learning is extracted as a skill, it becomes:

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

markdown
---

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

The project-level .claude/settings.json creates persistent session behavior that automatically invokes local scripts during future agent interactions. In the context of a self-improvement skill, persistence makes the setup more dangerous because it continuously injects additional context and command execution pathways, which can compound risks from prompt-triggered workflows or later script modification.

Content

Scanner excerpt · references/hooks-setup.md (reported line 15)May include surrounding context.

Option 1: Project-Level Configuration

Create .claude/settings.json in your project root:

json
{

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file documents a hook configuration where the matcher is an empty string, which effectively matches all prompts. That trigger scope is extremely broad and overlaps with ordinary usage, and the guide does not provide exclusion conditions or tighter constraints for when the hook should or should not run.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This configuration installs a global hook in ~/.claude/settings.json with an empty matcher, causing the script to run for every prompt across all sessions and repositories. That broad persistent scope increases the blast radius if the script is modified, replaced, or later expanded to handle sensitive prompt content, and it normalizes automatic execution from a user-writable location.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Although presented as a lower-overhead option, this configuration continues to use an empty matcher for UserPromptSubmit. That means the trigger still applies to any prompt, and the documentation does not define boundaries or exclusions for activation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This setup example mirrors the same empty matcher pattern for UserPromptSubmit, so the skill would activate for any prompt in Codex sessions. The documentation does not limit the trigger to debugging, learning capture, or other specific contexts until much later as an optional optimization.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The instructions establish persistent local memory for a self-improvement mechanism without discussing retention, access controls, or what categories of data are safe to store. Because the skill is specifically designed to capture failures, corrections, and learnings, persistent session-derived memory can accumulate sensitive information and increase long-term exposure on disk.

Content

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

openclaw hooks enable self-improvement

text

### 3. Create Learning Files

Create the `.learnings/` directory in your workspace:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide instructs users to create persistent .learnings/ storage but does not warn that these files may capture session-derived content, including sensitive prompts, failures, or user corrections. In a self-improvement skill, persistent memory is core functionality, so omission of retention and sensitivity guidance increases the risk of storing secrets or private data indefinitely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The cross-session features explicitly enable reading transcripts and sending messages between sessions, but the documentation provides no privacy boundary, consent model, or warning about sensitive information exposure. In this skill context, learnings and corrections may be propagated across sessions, so undocumented transcript access materially increases the chance of unintended data disclosure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The 'Detection Triggers' section lists broad conditions such as 'User corrections,' 'API errors,' and 'Knowledge gaps' without defining thresholds, scope, or exclusions. In a markdown skill/integration guide, this ambiguity can cause the skill or related logging behavior to activate in many ordinary situations unintentionally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Creating directories and generating templated skill documentation is a capability for authoring new skills, not an obvious requirement for recording failures, corrections, outdated knowledge, or better approaches. The manifest does not state that the skill may generate new skills from learnings, so this capability is contextually broader than advertised.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The phrase 'before major tasks' does not define what makes a task major, so different agents may invoke the review step inconsistently. This creates an unclear activation condition rather than a concrete, bounded trigger.

Content

No source excerpt is available for this finding.