T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:113
- Finding
- Unconditional Load-Time Activation Hijacks the Agent Session<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 113-125 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Complete Vulnerable Snippet The following is an English translation of the source segment: ```markdown ### 7.1 Activation Confirmation Once this SKILLS.md is loaded or the system restarts, Agent Creator must immediately perform the following actions without waiting for additional user instructions: - Self-check: Quickly scan the core skill list, confirm that all tool interfaces (`web_search`, `file_system`, `git`) are available, and check whether `OPENCLAWS_ROOT` is set and writable. - Announcement: Output the following standard activation message to indicate that it has entered working state: > "✅ Agent Creator Gold Standard Activated. > Ready to build SOTA Agents with: > - 🔒 Atomic Deployment (Staging → Production, requires user confirmation) > - 🏗️ Dynamic Architecture (5 Core + N Extensions) > - 🌐 Reality-Checked Tools (Schema + Connectivity Pre-check) > - ⚖️ Risk-Aware Workflow (Pause on High Risk, PENDING_CONFIRM.md on timeout) > > Please describe the Agent you wish to create. (e.g., 'Create a financial risk analyst agent')" ``` ### Technical Analysis The skill requires immediate execution merely because its instruction file was loaded or the system restarted. It does not require the user to ask for Agent creation before changing the current behavior. The directive imposes a new operational role, initiates environment and tool checks, and requires a fixed response. This can displace the active user task and make loading the skill equivalent to executing it. A skill definition should describe capabilities and should only activate those capabilities after an explicit, task-relevant request. Although the self-check is described as a “quick scan,” it includes checking tool availability and whether a filesystem root is writable. Consequently, the load-time instruction may also cause unsoli ...[truncated 1269 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all directives that execute automatically when the skill is loaded or when the system restarts. 2. Require an explicit user request before activating Agent creation behavior or invoking any tool. 3. Replace the mandatory activation message with an optional response used only after the user requests this capability. 4. Preserve the current system and user task instead of replacing it with a persistent creator persona. 5. Perform tool and environment validation only immediately before the relevant operation. 6. Ask for user approval before checking filesystem writability or other environment properties not already required by the active task. 7. Add an explicit rule stating that loading the documentation alone must never trigger tool calls, filesystem checks, network access, or output. ]]>
