Back to skill

Security audit

my-test-2

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it creates durable agent memory and optional always-on reminders with too little scoping, review, or privacy guidance.

Install only if you deliberately want persistent agent learning. Keep it project-local, avoid user-level/global hooks and empty matchers, redact secrets before logging, review every proposed write to CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or Copilot instructions, and avoid cross-session transcript or message features unless explicitly needed.

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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Warning
Location
hooks/openclaw/handler.js:8
Finding

Agent Bootstrap Context Injection Through the OpenClaw Hook

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; } // 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-submit hook also emits instructions into agent context: ```bash cat << 'EOF' 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 se ...[truncated 2127 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:262
Finding

Unreviewed Promotion of Captured Content Into Persistent Agent Instructions

Content
View full analysis
= 3` - Seen across at least 2 distinct tasks - Occurred within a 30-day window Promotion targets: - `CLAUDE.md` - `AGENTS.md` - `.github/copilot-instructions.md` - `SOUL.md` / `TOOLS.md` for OpenClaw workspace-level guidance when applicable ``` ```markdown 7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github/copilot-instructions.md ``` The OpenClaw workflow reinforces cross-session promotion: ```markdown ## Learning Workflow ### Capturing Learnings 1. **In-session**: Log to `.learnings/` as usual 2. **Cross-session**: Promote to workspace files ### Promotion Decision Tree Is the learning project-specific? ├── Yes → Keep in .learnings/ └── No → Is it behavioral/style-related? ├── Yes → Promote to SOUL.md └── No → Is it tool-related? ...[truncated 2526 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/extract-skill.sh:106
Finding

Workspace Write Restriction Can Be Bypassed Through Symbolic Links

Content
View full analysis
"$SKILL_PATH/SKILL.md" << TEMPLATE --- name: $SKILL_NAME description: "[TODO: Add a concise description of what this skill does and when to use it]" --- ``` ### Technical Analysis The script attempts to keep writes inside the current workspace by rejecting absolute paths and `..` path segments. These checks operate only on the lexical path supplied by the user. They do not resolve symbolic links or verify that the canonical destination remains under the canonical working directory. If a component of `--output-dir` is a symbolic link to a directory outside the workspace, `mkdir -p` and shell redirection follow that link. The resulting `SKILL.md` is therefore created outside the intended boundary. The skill name is strictly validated, which prevents direct traversal through `SKILL_NAME`, but it does not mitigate a symlink in `SKILLS_DIR`. ### Attack Path 1. The attacker can create or control a path within the current workspace. 2. The attac ...[truncated 1454 chars]
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
97% confidence
Finding

The skill is presented primarily as a learning-capture capability, but it also instructs the agent to create reusable skills from learnings and run helper scripts that write new files. That expanded behavior increases the skill's authority and filesystem impact beyond what a user may infer from the description, which can lead to unexpected file creation or promotion of content into durable agent instructions.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill encourages reading other session transcripts and sending learnings across sessions, which expands the audience and lifetime of potentially sensitive content. Cross-session propagation can bypass user expectations about data isolation and turn one-session disclosures into broader workspace memory exposure.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The templates instruct the agent to capture full context, input parameters, user context, related files, and actual error output. Error messages and command contexts commonly contain credentials, file paths, environment values, API payloads, or proprietary code details, so these templates materially increase the likelihood of sensitive-data leakage into durable logs.

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 persistence in an agent configuration directory, affecting all future sessions for that user. In the context of a self-improvement skill that auto-triggers hooks, this is more dangerous because it creates long-lived behavioral changes and expands any misconfiguration or abuse beyond a single repository.

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

The manifest description lists many invocation conditions without clear exclusion boundaries, encouraging frequent or automatic use. While not directly malicious, this makes accidental activation more likely and compounds the privacy and persistence risks elsewhere in the skill.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly directs the agent to retain corrections, errors, failures, and other user-provided content in persistent local files and to promote them into shared memory/instruction files. This creates a real risk of storing secrets, proprietary prompts, personal data, or sensitive operational details far beyond the original session.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
72% confidence
Finding

The skill establishes persistent storage under a home-directory workspace, causing retained state across sessions. Persistent memory is not inherently unsafe, but in this context it increases the blast radius of the logging behaviors by making accidental collection durable and broadly reusable.

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation triggers are broad natural-language phrases like common chat requests, so the skill may activate during ordinary conversation and start logging or promoting content without a strong signal that the user intended persistence. In a coding-agent context, overbroad activation increases the chance of collecting sensitive prompts, corrections, or contextual details into durable files.

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

Creating project-level hook configuration introduces session persistence by causing future sessions in the repository to automatically load the self-improvement hooks. While this is part of the feature design, it still alters agent behavior beyond the immediate task and can silently persist broad auto-triggering if users forget it was enabled.

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 activator hook to run on every prompt, creating broad, automatic interception of all user interactions. In a self-improvement skill, this increases the chance of unnecessary context injection, sensitive prompt exposure to hook logic, and persistent behavior amplification across the session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The user-level configuration installs the hook in ~/.claude/settings.json for global activation, extending the unconstrained trigger scope across all projects and sessions. This magnifies the blast radius of any script bug, prompt leakage, or unintended persistence because every future interaction can invoke the hook automatically.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The 'minimal' setup still uses an empty matcher, so it remains a universal trigger despite being presented as lower overhead. This framing can mislead users into adopting broad always-on behavior while believing the setup is reduced-risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document states the hook scripts only output text and do not run commands, but the hooks are explicitly configured as shell commands and the guide also references an extraction script invocation. This is a misleading security claim that can cause users to underestimate the trust boundary and grant execution to local scripts without appropriate review.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

Creating a persistent .learnings directory in the workspace or skill directory establishes session-to-session retention of model observations and user-derived content. In a self-improvement context, this increases the risk of storing sensitive information long-term and of persisting unsafe or adversarial content that later influences behavior.

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

The document tells the agent to log significant errors and learnings to persistent files but does not warn against storing secrets, personal data, or sensitive session content. Persistent memory files can accumulate API keys, proprietary prompts, user corrections containing confidential information, or other sensitive artifacts that survive beyond the current session.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide expands a self-improvement skill into using cross-session capabilities such as listing sessions, reading other session history, messaging them, and spawning sub-agents. Those powers are broader than needed for local learning capture and can expose unrelated conversation data or enable unintended data flow between sessions if used without strict scope and consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The integration introduces session history access and cross-session messaging without any privacy notice, consent model, or scope restriction. This can normalize reading unrelated transcripts and forwarding information between sessions, increasing the chance of privacy leakage or unauthorized reuse of prior user data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The OpenClaw-specific trigger table instructs the agent to promote observations into injected behavior files like AGENTS.md, SOUL.md, and TOOLS.md. Because those files shape future agent behavior, writing to them based on runtime events creates a prompt-persistence channel that can amplify mistakes, preserve prompt injection, or silently alter agent policy over time.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown template explicitly instructs authors to include trigger conditions, but the placeholder text is very general and does not require concrete trigger phrases, scope limits, or negative examples. Because this is a reusable template for skill descriptions, it may lead authors to publish overly broad activation criteria that collide with ordinary language.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The template's Quick Reference table uses placeholder entries like '[Trigger 1]' and '[Trigger 2]' without any instruction that triggers must be narrow, domain-specific, or disambiguated from everyday speech. In a template intended for broad reuse, this omission can propagate ambiguous activation descriptions into downstream skills.

Content

No source excerpt is available for this finding.