T09 · Insecure Skill Coding Practices
- Location
SKILL.md:13- Finding
Untrusted Skill Content Is Injected into Child-Agent Instructions Without Isolation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:13-31;references/evaluation-protocol.md:3-7
Vulnerability Type: Prompt injection through untrusted evaluation material
Risk Level: MediumVulnerable Snippets
English rendering of the relevant instructions from
SKILL.md:13-31:markdown ### Step 1: Read the target skill Read all files in the target skill directory, excluding binary and non-text files: - `SKILL.md` - `scripts/*` (`.sh`, `.py`, `.js`, etc.) - `references/*` (`.md`, etc.) - Other text configuration files ### Step 2: Start three child agents in parallel Use the evaluation protocol in `references/evaluation-protocol.md`, populate it with the evaluated skill information and the complete contents of every file, and then spawn three child agents at the same time using `mode="run"`. Each child agent task must contain: 1. A role declaration 2. Evaluated skill information 3. All evaluation materials, including complete file contents 4. Evaluation criteria 5. Output-format requirementsEnglish rendering of the relevant instructions from
references/evaluation-protocol.md:3-7:markdown Every time a child agent is spawned for evaluation, send the following complete content as its task. ## Evaluated Skill Information Populate this section with the target skill name, version, brief description, and the complete contents of every file.Technical Analysis
The evaluated files are untrusted, attacker-controlled input. The workflow copies their complete contents directly into the instruction context sent to three child agents. It does not require strong data delimiters, tell the child agents to treat embedded instructions solely as evidence, prohibit compliance with directives found in evaluated files, or constrain unnecessary child-agent tools.
Consequently, a malicious target file can include prompt-injection instructions that compete with the e ...[truncated 2031 chars]
- Remediation
View remediation
Remediation Suggestions
- Place evaluated content inside explicit, uniquely generated data delimiters and state that everything within those delimiters is untrusted evidence, not executable instructions.
- Add a mandatory evaluator rule that directives, role declarations, tool requests, and output-format requests found inside evaluated files must never be followed.
- Require evaluators to report detected prompt-injection language as a security finding.
- Run child agents with no tools unless a tool is strictly necessary. If tools are required, use an explicit allowlist and deny shell execution, network access, writes, and access outside an isolated workspace.
- Validate
SCORE_SUMMARYindependently against a strict schema: require exactly the expected keys, integer values from 1 through 10, one summary block, and no malformed or duplicate fields. - Do not rely solely on model-produced marker blocks. Cross-check every score against the associated written rationale and reject inconsistent responses.
- Apply file-count, file-size, and total-context limits. Reject unsupported file types and clearly report omitted or truncated material.
- Consider evaluating suspicious files in separate contexts and synthesizing findings only after stripping embedded directives.
- Update both
SKILL.mdandreferences/evaluation-protocol.mdso these protections are mandatory rather than optional guidance.
