Back to skill

Security audit

Tmp Self Improving Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it can save chat-derived details and promote them into persistent agent instructions, so it needs careful review before installation.

Install only if you want persistent learning/memory behavior. Prefer project-local .learnings storage, avoid global always-on hooks, review hook scripts before enabling them, redact secrets and private context before logging, and require explicit human approval before anything is promoted into CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, SOUL.md, TOOLS.md, or a new skill.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (2)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:262
Finding

Untrusted Learning Content Can Be Promoted into Persistent Agent Instructions

Content
View full analysis
" .learnings/LEARNINGS.md` 4. If found: - Increment `Recurrence-Count` - Update `Last-Seen` - Add `See Also` links to related entries/tasks 5. If not found: - Create a new `LRN-...` entry - Set `Source: s ...[truncated 3931 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:32
Finding

Mutable and Unverified Remote Sources Are Used for Privileged Hook Installation

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description is about maintaining and using learnings after failures, corrections, outdated knowledge, or improved approaches. The supplied code does not implement any learning-capture or review behavior. Instead, it is a helper utility for extracting/promoting a learning into a new skill by creating a folder and template file on disk. This is a materially different primary purpose and includes undeclared file-creation capabilities. While the script references learnings conceptually, its actual behavior is scaffolding a skill, not capturing or reviewing learnings.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Instructing users to modify ~/.claude/settings.json establishes persistent behavior in a sensitive agent configuration directory. While not inherently malicious, changing global agent config can create durable execution paths for local scripts, so if those scripts are later modified or replaced, every future session may invoke them automatically.

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says to use the skill whenever a user corrects Claude, requests a missing capability, or when a better approach is discovered, which are very broad situations that can occur in many normal interactions. It does not clearly bound when the skill should not activate, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs agents to persist corrections, errors, and session-derived details to long-term files but gives no upfront privacy or data-handling warning. In practice, this can normalize storing sensitive user content, secrets, or proprietary context in durable memory artifacts without user awareness.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The skill explicitly creates a persistent directory under the user's home workspace, enabling long-lived retention of session-derived data across tasks and sessions. Persistence itself is not malicious, but in the context of this skill's broad logging guidance it materially increases privacy and data-retention risk.

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
97% confidence
Finding

The inter-session communication guidance encourages sharing learnings across sessions, which can propagate user-provided context beyond its original scope. Without minimization, redaction, or access controls, sensitive information can be copied into other agent sessions and become harder to contain or delete.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The logging templates explicitly ask for full context around corrections and learnings, which creates a strong chance of persisting sensitive user data in long-term markdown files. Because these files may later be reviewed, promoted, or shared, a single overbroad entry can lead to durable exposure of confidential information.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The error template directs the agent to store raw error output, inputs, parameters, and environment details, all of which commonly contain secrets such as API keys, paths, hostnames, tokens, cookies, or customer data. Persisting these verbatim into logs materially increases the likelihood of credential leakage and secondary compromise.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Phrases like "Can you also...", "Is there a way to...", and correction snippets such as "Actually..." are common in ordinary chat and are not specific enough to safely signal this skill. The section presents them as automatic logging triggers without negative examples or contextual constraints.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The recommendation to 'promote aggressively' into persistent memory files expands the blast radius of any sensitive information captured earlier. Once copied into broader agent context files, the data may influence future sessions and be exposed repeatedly, making remediation and deletion much more difficult.

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 guide creates persistent hook configuration in agent settings, causing the behavior to survive across sessions and continue running without fresh user review. Persistence is security-relevant here because the feature executes local scripts automatically, so an initially accepted configuration may become unsafe later if surrounding files change.

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
96% confidence
Finding

An empty matcher causes the hook to fire on every prompt, creating pervasive interception of user interactions and maximizing the blast radius of any bug, prompt injection, or future script change. In a self-improvement skill, this broad trigger is especially risky because it normalizes always-on capture across all work rather than limiting activation to error-handling or debugging contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Using an empty matcher in a user-level configuration enables the hook across all sessions and repositories, turning a local convenience feature into persistent global behavior. That increases exposure to sensitive prompts, unrelated projects, and accidental cross-context data capture, while also making malicious or unsafe script modifications far more impactful.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Codex CLI example repeats the same always-match behavior, broadening execution to every prompt in another agent environment. Cross-tool propagation of an unrestricted hook increases the chance that sensitive or irrelevant sessions are affected and makes the pattern easier to copy without understanding the security implications.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document's security section is misleading: the configured hooks are executed as shell commands, so the scripts necessarily run as commands even if their intended behavior is only to print text. This can cause operators to underestimate the execution and trust boundary, increasing the chance they enable unreviewed scripts with the agent's privileges.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The file recommends creating persistent learning storage in either the workspace or installed skill directory, encouraging long-lived retention of agent-generated memory. In the context of a self-improvement skill that captures failures, corrections, and learnings, this can accumulate sensitive operational context and make prompt-injection residue or confidential data persist across sessions.

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:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a self-improvement skill focused on recording learnings, errors, corrections, and reviewing those learnings before major tasks. This script instead scaffolds a new skill directory and writes a SKILL.md template, which is a skill-generation workflow rather than a learning-capture or learning-review operation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Creating directories and generating a new SKILL.md template is a repository authoring capability. That capability is not an obvious requirement of a skill whose stated purpose is to capture corrections and failures for continuous improvement.

Content

No source excerpt is available for this finding.

Ssd 3

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Recording detailed user context for feature requests can preserve private business plans, internal workflows, or personal information in durable files. While less immediately dangerous than logging secrets, it still creates confidentiality and privacy risk through unnecessary retention.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file includes filesystem-modifying commands (cp -r into ~/.openclaw/skills/ and ~/.openclaw/hooks/) but does not warn that they change the user's local OpenClaw installation and may overwrite existing skill or hook directories. For markdown files, SQP-2 applies when descriptions omit warnings about behavior that could affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The guide explicitly tells users to create persistent .learnings/ storage but does not warn that model outputs, user prompts, errors, or other session-derived content may be written to disk indefinitely. In a self-improvement skill, that increases the chance of sensitive data retention and later unintended disclosure, especially because the feature is framed as routine workflow.

Content

No source excerpt is available for this finding.