T01 · Skill Instruction Hijacking
- Location
SKILL.md:36- Finding
Autonomous Promotion of Untrusted Introspection Content into Persistent Agent Rules
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is openly aimed at self-improvement, but it sets up unattended workflows that can rewrite core agent behavior before a user reviews the changes.
Install only if you deliberately want an autonomous, scheduled self-modification workflow. Before using it, require human approval before any AGENTS.md, MEMORY.md, or TOOLS.md edits, add a retention and redaction policy for introspection records, and document how to disable the cron entries.
SKILL.md:36Autonomous Promotion of Untrusted Introspection Content into Persistent Agent Rules
SKILL.md:58Recurring Scheduled Tasks Preserve the Rule-Promotion Workflow Across Sessions
scripts/daily-introspect.py:13Unvalidated Date Argument Allows Path Traversal Reads
The description overstates the skill's functionality. The code is a data-collection/preparation script for introspection, not an autonomous self-improvement engine. It accesses the expected workspace resources for logs and learning files, so there is no suspicious undeclared resource access. However, the primary declared purpose says it automatically reviews logs, identifies mistakes, and upgrades rules, while the code only reads files and reports availability. The script even states that the actual LLM analysis happens elsewhere. Therefore this is a material description-to-behavior mismatch.
The declared description promises a fairly complete autonomous self-improvement system, including daily review of conversation logs, mistake identification, weekly rule refinement, and automatic upgrades to core rules. The supplied code chunk does much less: it reads weekly introspection files from a private directory, reads last week's evolution report for pending promotions, and reports counts. The critical analysis and rule-promotion steps are explicitly not implemented here and are deferred to external 'OpenClaw tool calling' per comments. This is therefore a material description/behavior mismatch: the code's actual purpose is infrastructure/input gathering for a weekly promotion workflow, not the full autonomous self-improvement behavior claimed.
The documentation describes automatic writes to core rule files without prominently warning that the skill can alter system behavior. Users and operators may enable or schedule it without understanding that it can mutate governing instructions, which makes accidental policy corruption or persistence of unsafe rules much more likely.
The skill explicitly instructs the agent to promote learned rules into AGENTS.md, MEMORY.md, and TOOLS.md, which are effectively core policy and behavior files. Allowing an autonomous workflow to rewrite governing instructions based on model-generated introspection creates a self-modification channel that can entrench errors, weaken safeguards, or introduce attacker-influenced rules from prior conversations.
The skill declares capabilities that read environment/workspace data and drive file-processing workflows, but it does not declare an explicit tool scope or permission boundary. In a skill that processes logs and proposes file mutations, missing scope increases the chance of overbroad access and unsafe invocation because the runtime cannot enforce least privilege clearly.
The manifest uses broad autonomous trigger language such as self-improvement, automatic upgrades, and evolution, which can cause the skill to be invoked in overly broad contexts. In a skill that reads logs and can influence policy files, ambiguous invocation criteria materially raise the risk of unintended execution and misuse.
The skill states it will automatically review conversation logs and archived records but omits a privacy warning about the collection, retention, and analysis of potentially sensitive content. Because it also stores derived records in a hidden workspace directory, users may not realize the extent of monitoring and persistence.
The workflow directs the agent to read full conversation logs and working-state files, synthesize the contents, archive them, and send a report to the user. This creates a natural-language exfiltration path where secrets, private notes, or hidden operational state from those files may be surfaced or retained without sufficient filtering.
The skill persistently stores introspection records across runs in a hidden directory, creating session memory that can influence future behavior and retain sensitive context longer than expected. Persistence is especially risky here because the stored content is later used as input for weekly promotion decisions, potentially amplifying poisoned or privacy-sensitive data over time.
- Identify incorrect answers, rule violations, and bad patterns
- Extract concrete improvement suggestions
- Classify as: one-time mistake / repeat pattern / new rule
3. Write daily record to `workspace/.daily-introspection/introspection-YYYY-MM-DD.md` (private data directory)
### 2. Weekly Promotion (triggered by cron on Sunday 20:00)
1. Aggregate all daily introspections from the week (read from `workspace/.daily-introspection/`)
The cron workflow tells the agent to append new errors and corrective rules into .learnings/ERRORS.md, creating a persistent write path from runtime observations into future guidance. This can be abused through prompt injection or misclassification, causing untrusted session content to become durable operational rules or incident records.
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.
return checks
def get_private_data_dir():
"""Get private data directory (create if missing)"""
workspace = os.environ.get("OPENCLAW_WORKSPACE", os.path.expanduser("~/.openclaw/workspace"))
private_dir = os.path.join(workspace, ".daily-introspection")
if not os.path.exists(private_dir):
No suspicious patterns detected.