Back to skill

Security audit

自我提升助手

Security checks for vulnerabilities and agentic risk

Overview

This skill is a broad self-learning system that can persist session-derived data and modify other skill instructions, with global hooks that log raw tool inputs and outputs.

Install only if you intentionally want a cross-session learning system that can retain interaction details and propose or make changes to skill instructions. Keep automatic hooks disabled for sensitive work, avoid raw tool I/O logging, and require reviewable diffs before any memory-derived pattern modifies installed skills.

Vulnerability Patterns
  • 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
  • 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:181
Finding

Untrusted session content can be persisted into memory and propagated to other skills

Content
View full analysis
= 7: pattern_level: strength action: Reinforce this approach If user_rating <= 4: pattern_level: weakness action: Add to "What to Avoid" section ``` ### Phase 3: Skill Updates Update the appropriate skill files with **evolution markers**: ### Phase 4: Memory Consolidation 1. **Update semantic memory** (`memory/semantic-patterns.json`) 2. **Store episodic memory** (`memory/episodic/YYYY-MM-DD-{skill}.json`) 3. **Update pattern confidence** based on applications/feedback 4. **Prune outdated patterns** (low confidence, no recent applications) ``` Related self-correction inst ...[truncated 3129 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
hooks/pre-tool.sh:1
Finding

Tool hooks expose complete inputs and Bash outputs through unredacted logging

Content
View full analysis
&2 if [[ -n "${tool_input}" ]]; then echo "[self-improving-agent] Input: ${tool_input}" >&2 fi ``` Complete `hooks/post-bash.sh`: ```bash #!/usr/bin/env bash set -euo pipefail tool_output="${1:-}" exit_code="${2:-0}" echo "[self-improving-agent] PostToolUse: exit=${exit_code}" >&2 if [[ -n "${tool_output}" ]]; then echo "[self-improving-agent] Output: ${tool_output}" >&2 fi ``` The documented hook configuration at `SKILL.md:327-347` passes complete payloads as command-line arguments: ```json { "hooks": { "PreToolUse": [ { "matcher": "Bash|Write|Edit", "hooks": [ { "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/pre-tool.sh \"$TOOL_NAME\" \"$TOOL_INPUT\"" } ] } ], "PostToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "bash ${SKILLS_DIR}/self-improving-agent/hooks/post-bash.sh \"$TOOL_OUTPUT\" \"$EXIT_CODE\"" } ] } ] } } ``` ### Technical Analysis The pre-tool hook receives complete inputs for Bash, Write, and Edit operations and writes them verbatim to standard error. The post-Bash hook similarly writes complete command output to standard error. No field filtering, secret detection, redaction, truncation, or opt-in diagnostic control is applied. Tool inputs and outputs commonly contain access tokens, passwords, environment variables, private keys, proprietary source code, personal data, command-line ...[truncated 2058 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (33)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level description emphasizes continuous learning and codebase evolution but does not clearly warn that the skill persists interaction-derived memory and may automatically update other skills. That omission undermines informed consent and can cause operators to enable a capability that modifies behavior and stores data more broadly than expected.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
98% confidence
Finding

The workflow explicitly includes 'Update Skills' as an automatic step after extracting experience and identifying patterns, i.e. self-modification based on prior interactions. Self-modifying security-relevant behavior is high risk because incorrect, poisoned, or adversarially induced patterns can silently alter future agent logic and spread changes across related skills.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

text
Any Skill Completes
        ↓
Extract Experience → Identify Patterns → Update Skills → Consolidate Memory
        ↓                     ↓                  ↓              ↓
   What happened?    What can we reuse?   Which skills?    Track metrics

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The hook configuration explicitly captures raw tool input, raw tool output, and exit status for processing, which is a broad data collection mechanism likely to ingest credentials, tokens, code, file paths, and user content. In a self-improving system, that data can be retained, analyzed, and used to influence future behavior, compounding both privacy and integrity risks.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README states the skill should run after 'ANY skill completes' and then lists broad examples, creating an effectively universal trigger surface. In a self-modifying skill, this is dangerous because routine interactions can silently feed into learning, memory writes, and downstream skill updates without clear user consent or scope boundaries.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a sophisticated self-improving agent with persistent learning, multiple memory systems, and automatic codebase evolution triggered by skill completion or errors. The supplied code only accepts tool output and an exit code, then prints them to stderr. While it is implemented as a post-tool hook, it does not analyze outcomes, store memories, update any code, or perform corrective actions. This is a material description-behavior mismatch because the actual code is only a logging hook, not a self-improving agent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises a sophisticated autonomous learning and self-correction system that learns from all skill experiences and auto-triggers on completion/error. The actual code only prints the tool name and input during a pre-tool hook. This is a materially different primary purpose and trigger, with none of the declared memory, learning, or code-modification capabilities implemented in the supplied chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a complex self-improving agent with semantic/episodic/working memory, continuous learning from all skill experiences, and automatic corrective behavior via hooks. The supplied code does none of that: it is a minimal session-end hook that simply echoes a log message to stderr. This is a material description-behavior mismatch because the primary purpose and claimed capabilities are absent, and the implemented trigger is specifically session end rather than the broader skill completion/error behavior described.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is designed to auto-trigger for effectively all skill events, creating an extremely broad execution surface. In the context of a self-modifying agent with read/write/bash capabilities, such global activation can cause unreviewed propagation of changes, accidental tampering, or cascading behavior across unrelated tasks.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Automatic session logging combined with the documented capture of tool inputs and outputs can persist sensitive user content, credentials, proprietary code, or command results. Because logging is automatic and cross-cutting, it can silently aggregate high-value information across many sessions.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
96% confidence
Finding

Logging session starts, completion context, and error details across any skill creates a high risk of context leakage. In this skill's universal scope, those logs may accumulate sensitive prompts, operational details, and failure artifacts from unrelated tasks into a central memory system.

Content

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

md
| Event | Trigger | Action |
|-------|---------|--------|
| **before_start** | Any skill starts | Log session start |
| **after_complete** | Any skill completes | Extract patterns, update skills |
| **on_error** | Bash returns non-zero exit | Capture error context, trigger self-correction |

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Using vague trigger terms like 'Any skill starts' and 'Any skill completes' makes the skill's activation boundary ambiguous and effectively universal. That is dangerous because the same document also instructs logging context, extracting patterns, and updating files, which could apply to sensitive sessions well beyond the intended scope.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
99% confidence
Finding

The skill explicitly directs automatic updating of skills after completion, enabling self-modification of the agent's own instruction set. Self-modification is dangerous because it can introduce unreviewed behavior changes, poison future runs, and propagate mistakes or malicious prompt-derived content into persistent trusted files.

Content

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

md
| Event | Trigger | Action |
|-------|---------|--------|
| **before_start** | Any skill starts | Log session start |
| **after_complete** | Any skill completes | Extract patterns, update skills |
| **on_error** | Bash returns non-zero exit | Capture error context, trigger self-correction |

### Manual Triggers

Self-Modification

High
Category
Rogue Agent
Confidence
99% confidence
Finding

The self-correction workflow instructs updating skill files when guidance appears wrong, which grants the agent authority to rewrite its governing instructions based on runtime outcomes. Without strict review and provenance controls, this creates a code/instruction poisoning channel and can amplify transient errors into persistent unsafe behavior.

Content

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

md
- Was the guidance incomplete?

3. Apply Correction
   - Update skill file with corrected guidance
   - Add correction marker with reason
   - Update related patterns in semantic memory

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
91% confidence
Finding

The skill instructs users to modify the agent configuration in ~/.claude/settings.json to install broad hooks. Touching a global agent config directory expands persistence and can affect all future sessions, creating a durable interception point for logging and self-modification behavior.

Content

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

Wiring Hooks in Claude Code Settings

Add to Claude Code settings (~/.claude/settings.json):

json
{

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The hook commands forward raw TOOL_INPUT and TOOL_OUTPUT into scripts, which can directly expose prompts, secrets, source code, command outputs, and other sensitive data to logging or secondary processing. This creates a powerful collection mechanism spanning Bash, Write, and Edit actions, making context leakage especially severe.

Content

No source excerpt is available for this finding.

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

md
### DON'T

- ❌ Over-generalize from single experiences
- ❌ Update skills without confidence tracking
- ❌ Ignore negative feedback
- ❌ Make changes that break existing functionality
- ❌ Create contradictory patterns

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

md
### DON'T

- ❌ Over-generalize from single experiences
- ❌ Update skills without confidence tracking
- ❌ Ignore negative feedback
- ❌ Make changes that break existing functionality
- ❌ Create contradictory patterns

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manual trigger phrase at this line is a common natural-language expression, which makes accidental invocation plausible during ordinary conversation. In the context of a self-improving agent that learns from all skill experiences and may modify memory or behavior, unintended activation broadens the attack surface and can cause unreviewed learning or state changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This trigger phrase is underspecified and likely to match benign user intent, increasing the chance that the skill is invoked when the user merely discusses learning from experience. Because this skill is designed for continuous evolution and cross-session memory use, unintended invocation is more dangerous than for a read-only informational skill.

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 · OPENCLAW_HOOKS.md (reported line 92)May include surrounding context.

md
## 参考

- 技能文档:`/root/.openclaw/workspace/skills/self-improving-agent/SKILL.md`
- 安装说明:`/root/.openclaw/workspace/skills/self-improving-agent/README.md`

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README describes learning from every skill interaction and maintaining semantic, episodic, and working memory on disk, which creates a built-in retention channel for potentially sensitive natural-language and operational data. In the context of a universal agent that spans many skills, broad retention increases the chance of secrets, proprietary context, or security-sensitive prompts being stored and later resurfaced or propagated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The hook examples pass raw tool input and output into shell scripts, but the README does not provide a clear privacy or data-handling warning. Because tool inputs and outputs can contain secrets, proprietary code, or personal data, documenting this as optional is not sufficient without explicit disclosure and minimization guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README defines manual invocation phrases in both Chinese and English, but presents them as fixed trigger strings without explaining language selection, alternatives, or opt-in locale behavior. This can impose language-specific activation requirements and creates ambiguity about which users or environments are expected to use which language.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description promises 'Auto-triggers on skill completion/error with hooks-based self-correction,' implying direct corrective behavior on error events. However, the only configured on_error hook at L021-L024 invokes session-logger, and the adjacent note explicitly says self-correction is not performed there.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is framed as learning from all skill experiences and continuously retaining information, but it does not define meaningful data-minimization boundaries. That creates a privacy and secrecy risk because unrelated or sensitive task content may be captured into long-lived memory stores without necessity.

Content

No source excerpt is available for this finding.