Back to skill

Security audit

Self Improvement

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it needs review because it encourages persistent learning logs and prompt-file changes that can influence future agent behavior.

Install only if you want an agent to keep persistent learning records. Keep .learnings local by default, redact secrets and personal data, avoid global hooks with empty matchers, and require human review before promoting anything into CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or copilot instruction files.

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.ts:10
Finding

Agent Bootstrap and Prompt Instruction Injection

Content
View full analysis
{ // Safety checks for event structure if (!event || typeof event !== 'object') { return; } // Only handle agent:bootstrap events if (event.type !== 'agent' || event.action !== 'bootstrap') { return; } // Safety check for context if (!event.context || typeof event.context !== 'object') { return; } // Skip sub-agent sessions to avoid bootstrap issues // Sub-agents have sessionKey patterns like "agent:main:subagent:..." const sessionKey = event.sessionKey || ''; if (sessionKey.includes(':subagent:')) { return; } // Inject the reminder as a virtual bootstrap file // Check that bootstrapFiles is an array before pushing if (Array.isArray(event.context.bootstrapFiles)) { event.context.bootstrapFiles.push({ path: 'SELF_IMPROVEMENT_REMINDER.md', content: REMINDER_CONTENT, virtual: true, }); } }; ``` The prompt-submission hook performs similar injection: ```bash # Output ...[truncated 3066 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:262
Finding

Persistent Agent Instruction Poisoning Through Learning Promotion

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a reflective/knowledge-capture skill meant to record learnings, errors, corrections, API/tool failures, and outdated knowledge for future improvement. The supplied code does something materially different: it is a shell script that scaffolds a new skill folder and markdown template under ./skills (or another relative output directory). Its primary function is file/directory creation, not capturing or reviewing learnings. While the template references extraction from a learning entry, the code neither parses learning content nor records failures/corrections; it only generates a placeholder skill structure. Therefore the actual behavior does not accurately match the declared purpose.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Directing users to modify ~/.claude/settings.json establishes persistence in the agent's global config directory, affecting future sessions beyond the current project. Any command hook configured there executes with the agent's privileges, so compromise or misuse of the referenced script can create durable cross-project influence.

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")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill encourages persistent logging of corrections, errors, and context but does not warn that these records may contain sensitive user data. Without a privacy notice and minimization rules, operators may store confidential information in plaintext files unintentionally.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Persisting user corrections, requests, and task context into shared learning files and memory creates a durable record that may outlive the original interaction and be visible to others. In this skill's context, the danger is elevated because the entire purpose is to capture and reuse conversational material, making accidental retention systematic rather than incidental.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

The skill explicitly creates persistent storage under a workspace directory, enabling long-term retention of operational and conversational data. Persistence is not inherently unsafe, but in this context it becomes a real security/privacy concern because the stored content is encouraged to include errors, context, and user-derived learnings.

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions to read other session transcripts and send learnings across sessions expand the audience and lifetime of conversation data without any privacy guardrails. This can expose information beyond its original context and violate least-privilege expectations for session isolation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Reading other sessions' transcripts and forwarding learnings across sessions broadens data sharing and increases the chance that private content is reused outside its original purpose. This is especially risky in a memory/logging skill because transcript mining can aggregate sensitive details across multiple interactions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The templates explicitly ask for full context, parameters, and user context, which are common carriers for secrets and personal information. Because the files are plain markdown and may be checked into repos or synced across tools, verbatim logging can turn transient sensitive inputs into long-lived disclosures.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The templates request detailed context and error data but do not instruct redaction, minimization, or secret handling. Error logs often contain credentials, file paths, tokens, stack traces, or user inputs, so encouraging verbatim storage materially increases data exposure risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The auto-logging triggers are broad enough that an agent could persist routine conversation content, corrections, or incidental user statements without clear consent boundaries. In a skill centered on persistent logging, ambiguous triggers increase the chance of over-collection and unintended retention of sensitive data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generic quick prompts are short and broad, so they may be invoked during ordinary conversation and cause logging behavior when the user did not intend durable storage. This is lower impact than the main trigger section, but still raises the risk of accidental persistence.

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
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/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
93% confidence
Finding

The matcher field is set to an empty string for UserPromptSubmit, which effectively applies the hook to any prompt without constraining when it should activate. This is an ambiguous and overly broad trigger scope for a markdown setup guide, especially since no exclusion conditions or negative examples are given for ordinary prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The user-level configuration combines an empty matcher with placement in ~/.claude/settings.json, causing the hook to run for all prompts across all projects. That broad persistent scope increases the blast radius if the referenced script is modified, replaced, or later behaves unexpectedly, and can leak or influence unrelated sessions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The skill explicitly instructs creation of persistent learning storage under the workspace or skill directory, which enables retention of potentially sensitive prompts, errors, corrections, and operational context across sessions. In a prompt-injection-based environment where workspace files are reinjected at session start, persisted content can become a durable attack surface and can unintentionally store secrets or adversarial instructions for later reuse.

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:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script is explicitly documented and implemented as a 'Skill Extraction Helper' that creates a new skill from a learning entry. Generating new skill directories and templates is a separate capability from capturing errors, corrections, or lessons learned, and the manifest does not indicate that this skill should author new skills on disk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a skill focused on recording learnings, corrections, and failures for continuous improvement. This script instead scaffolds entirely new skills by creating directories and writing SKILL.md files, which is a repository/code-generation operation rather than capturing or reviewing learnings.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.