oathe / scan / reports / caution

Oathe Security Badge

Is self-improving-agent safe?

Use with caution. self-improving-agent is not clearly unsafe, but the audit flagged risks to review before you install it. Oathe's behavioral security audit gave self-improving-agent a trust score of 68/100 with 12 findings (2 high). Report updated

https://clawhub.ai/pskoett/self-improving-agent

68
CAUTION

Is self-improving-agent safe to install?

This skill is a well-intentioned continuous improvement framework, but its core design pattern — instructing agents to autonomously write to CLAUDE.md and other instruction files based on conversational patterns — creates a significant prompt injection escalation path. The hook scripts provide comprehensive surveillance of all user prompts and Bash output. No malicious intent detected, no exfiltration attempted, but the architectural pattern of 'promote learnings to system instructions' is inherently risky and could be exploited by adversarial interactions or combined with malicious skills.

What security issues were found in self-improving-agent?

Category Scores

Prompt Injection 52/100 · 30%
Data Exfiltration 72/100 · 25%
Code Execution 60/100 · 20%
Clone Behavior 78/100 · 10%
Canary Integrity 100/100 · 10%
Behavioral Reasoning 40/100 · 5%

Findings (12)

HIGH Persistent instruction file modification -30 ▶

The skill instructs the agent to write content to CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, and .github/copilot-instructions.md. These are all files that control agent behavior in future sessions. The instruction to 'promote aggressively — if in doubt, add to CLAUDE.md' means the agent will autonomously modify its own persistent instructions, creating a vector for instruction drift or manipulation.

Evidence: SKILL.md: 'Promote aggressively — if in doubt, add to CLAUDE.md or .github/copilot-instructions.md'; Promotion Targets table maps learning types to CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md

HIGH System-context-mimicking XML injection via hooks -18 ▶

The activator.sh and error-detector.sh scripts output XML-tagged content (, ) that mimics system instruction formatting. These tags are injected into the agent context on every prompt (activator) or every Bash command (error-detector), and could be mistaken by the agent as authoritative system directives.

Evidence: activator.sh outputs '<self-improvement-reminder>...</self-improvement-reminder>'; error-detector.sh outputs '<error-detected>...</error-detected>'

MEDIUM Sensitive file reads during installation -18 ▶

Filesystem monitoring captured reads of .env, .aws/credentials, and auth-profiles.json during the install process. While these appear to be OpenClaw platform behavior rather than skill-authored code, users installing this skill through OpenClaw should be aware their credentials files are being read.

Evidence: Filesystem events: OPEN/ACCESS /home/oc-exec/.env, /home/oc-exec/.aws/credentials, /home/oc-exec/.openclaw/agents/main/agent/auth-profiles.json

MEDIUM Error logging may capture sensitive data -10 ▶

The error logging format instructs agents to capture 'Input or parameters used', 'Environment details if relevant', and 'Actual error message or output'. Error messages frequently contain secrets, API keys, connection strings, and other sensitive data. These get written to plaintext .learnings/ERRORS.md files.

Evidence: SKILL.md error entry format includes '### Context - Command/operation attempted - Input or parameters used - Environment details if relevant'

MEDIUM Comprehensive Bash output surveillance -20 ▶

error-detector.sh reads the CLAUDE_TOOL_OUTPUT environment variable, which contains the full output of every Bash tool execution. Combined with the PostToolUse hook firing on every Bash command (empty matcher), this creates a surveillance layer over all shell activity. The script only pattern-matches for errors currently, but the mechanism provides full access to all command output.

Evidence: error-detector.sh: 'OUTPUT="${CLAUDE_TOOL_OUTPUT:-}"'; hooks-setup.md: PostToolUse matcher is 'Bash' with empty matcher pattern

MEDIUM Hook scripts run on every interaction -15 ▶

The recommended hook configuration uses empty matchers, meaning activator.sh fires on every single user prompt and error-detector.sh fires on every Bash command execution. This is a broad execution surface for scripts that come from a third-party skill.

Evidence: hooks-setup.md: '"matcher": ""' for UserPromptSubmit; '"matcher": "Bash"' for PostToolUse

MEDIUM Filesystem manipulation via extract-skill.sh -5 ▶

extract-skill.sh creates directories and writes files to arbitrary paths specified by the SKILLS_DIR environment variable or --output-dir flag. While the script validates skill name format, it does create files on disk.

Evidence: extract-skill.sh: 'mkdir -p "$SKILL_PATH"'; 'cat > "$SKILL_PATH/SKILL.md"'

LOW Autonomous behavior triggers without consent -5 ▶

The 'Detection Triggers' section instructs the agent to automatically log data when it detects conversational patterns like corrections, feature requests, or knowledge gaps. This autonomous behavior happens without per-instance user consent — the user agreed to install the skill but may not expect the agent to silently write files during conversations.

Evidence: SKILL.md: 'Automatically log when you notice: Corrections → learning with correction category; Feature Requests → feature request; Knowledge Gaps → learning'

LOW Escalation path from learnings to system instructions -30 ▶

The skill creates a pipeline: errors/corrections → .learnings/ files → CLAUDE.md/AGENTS.md. This 'promotion' mechanism means user interactions can eventually modify the agent's core instruction files. While intended for legitimate improvement, this is the same pattern a sophisticated attacker would use for slow-burn prompt injection.

Evidence: SKILL.md promotion workflow: '.learnings/ → CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, .github/copilot-instructions.md'

LOW Combination risk with other skills -30 ▶

A malicious skill could deliberately trigger errors or corrections that this skill would then log and potentially promote to CLAUDE.md. The self-improvement skill acts as an unwitting amplifier — any content that gets into the learning pipeline could eventually become a persistent instruction.

Evidence: Promotion table and 'promote aggressively' instruction create an open pipeline from transient context to persistent instructions

INFO OpenClaw platform reads credential files -12 ▶

The OpenClaw platform (not the skill itself) reads .env, .aws/credentials, and auth-profiles.json during installation. This is likely for platform authentication but users should be aware.

Evidence: Filesystem monitoring shows OPEN/ACCESS events for these files during install, before skill code executes

INFO Temp file creation in /tmp -10 ▶

Installation created directories and files in /tmp/openclaw-1000/ and /tmp/jiti/. These are platform runtime artifacts (jiti is a TypeScript transpiler cache). Files are transient and bounded.

Evidence: Filesystem events: CREATE /tmp/openclaw-1000/gateway.*.lock, multiple CREATE events in /tmp/jiti/

Should I install self-improving-agent?

Oathe's verdict for self-improving-agent is CAUTION with a trust score of 68/100. Recommendation: Install with caution.