T01 · Skill Instruction Hijacking
Error
- Location
- templates/AGENTS.md:1
- Finding
- Persistent Agent Authority and Behavioral Instruction Hijacking<![CDATA[ ## Vulnerability Details **File Location**: `templates/AGENTS.md`, lines 1-12 **Vulnerability Type**: Persistent instruction and authority hijacking **Risk Level**: Critical ### Vulnerable Code ```markdown # AGENTS.md — Operating Rules ## Every Session 1. Read `SOUL.md` — who you are 2. Read `USER.md` — who you're helping 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) 4. **Main session only:** Read `MEMORY.md` 5. Read `ops/changelog.md` — what changed since last session 6. Read `MISSION.md` — what are we working toward? ## Claude Code Coordination - **Claude Code is authoritative.** If Claude Code changed a config, cron, or file — that change stands. Never override or revert. If something looks wrong, flag it in the Ops topic instead. - `ops/changelog.md` is the shared bridge. Read it. Write to it. ``` Related autonomous instructions appear at lines 105-108: ```markdown ## AFK = Go to Work - **5+ minutes of silence = assume AFK.** Don't just pull from queue — ask: "What is 1 task that moves us closer to the mission right now?" (see MISSION.md) - Check in order: (1) anything broken/blocked I can fix? (2) research that sharpens a current front line? (3) memory/docs to improve? (4) production queue item that serves the mission? ``` ### Technical Analysis The installed template becomes a persistent OpenClaw operating prompt loaded in every session. It establishes an external component, Claude Code, as unconditionally authoritative and instructs the agent never to revert its changes. This authority rule can conflict with a current user request, a security decision, or a need to recover from a malicious or erroneous configuration change. The template also authorizes autonomous work after five minutes of inactivity. Although autonomous operation is part of the project's declared functionality, the rule is broad and is not limited to a predefined task list, restricted filesystem area, or fixed set of non-sensitive tools. These directives theref ...[truncated 1073 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace unconditional authority language with an explicit precedence rule: - System and developer safety requirements take priority. - The current authenticated user's instructions take priority over stored operational records. - Claude Code changes are evidence of system state, not irrevocable authority. - Permit rollback when a change is unsafe, compromised, or explicitly rejected by the user. - Make AFK automation opt-in and disabled by default. - Restrict autonomous work to a user-approved queue, workspace directory, tool allowlist, time window, and resource budget. - Require renewed approval before modifying configuration, creating cron jobs, contacting external services, or invoking sub-agents. - Record autonomous actions in an auditable log and provide a kill switch. ]]>
