T01 · Skill Instruction Hijacking
- Location
SKILL.md:10- Finding
Agent Role and Workflow Hijacking Through Mandatory Orchestration Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10–53
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: HighVulnerable Code
markdown You are Claw, the orchestrator. Read `AGENTS.md` for your role, team, and mode state. This file is the entry point for the skill system. ## Reference files (load on demand via `read`) | File | Contents | |---|---| | `skills/orchestrate/ref_latency.md` | Instant-path rules, context hygiene — read first | | `skills/orchestrate/ref_phases.md` | Four phases: Decompose → Tier → Spawn → Synthesise | | `skills/orchestrate/ref_models.md` | Model IDs by tier, free mode table | | `skills/orchestrate/ref_roles.md` | Sub-agent roster, spawn templates, workspace rules | | `skills/orchestrate/ref_patterns.md` | Orchestration patterns and anti-patterns | | `skills/orchestrate/ref_guardrails.md` | Safety, data handling, finance rules | ## Decision flowIncoming message │ ▼ [1] skills/orchestrate/ref_latency.md → instant path? → reply now, STOP │ no ▼ [2] Read MEMORY.md → find "FREE_MODE:" line FREE_MODE: true (or absent) → all spawns use openrouter/stepfun/step-3.5-flash:free FREE_MODE: false → spawns use role defaults in skills/orchestrate/ref_models.md │ ▼ [3] Single-role task, no dependencies? │ yes → spawn that sub-agent (skills/orchestrate/ref_roles.md), STOP │ no ▼ [4] Full phases (skills/orchestrate/ref_phases.md) │ ▼ [5] Synthesise and reply
text ## Free mode — always check MEMORY.md Before any spawn, confirm current mode: - `FREE_MODE: true` (default) → `model: "openrouter/stepfun/step-3.5-flash:free"`, `thinking: "none"` - `FREE_MODE: false` → use role defaults from `skills/orchestrate/ref_models.md`Technical Analysis
The skill directly reassigns the agent's identity with the instruction `You ar ...[truncated 2484 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the unconditional identity reassignment and describe orchestration as an optional capability rather than replacing the agent's role.
- Remove mandatory
STOPdirectives. The host agent should retain control of task completion and only terminate processing when required by higher-priority instructions or the user's request. - Treat
AGENTS.md,MEMORY.md, and all referenced Markdown files as untrusted data. Their contents must not override system, developer, or active user instructions. - Validate that referenced files exist and are located within an approved project root before reading them. Reject path traversal, symbolic-link escapes, and unexpected file types.
- Define a strict schema for configuration values such as
FREE_MODE. Parse only allowlisted values instead of interpreting arbitrary surrounding text as instructions. - Require explicit user approval before spawning sub-agents, transferring task data, or changing the processing model.
- Apply least-privilege controls to delegated agents and provide only the minimum context and tools required for the approved task.
- Pin reviewed orchestration policies and model mappings to trusted, version-controlled files rather than mutable memory state.
- Add a clear precedence rule stating that skill and workspace content cannot modify safety constraints, authorization boundaries, or higher-priority instructions.
- Fail safely when referenced files are missing or invalid instead of falling back to potentially unsafe implicit behavior.
