T09 · Insecure Skill Coding Practices
- Location
SKILL.md:21- Finding
Untrusted Documentation Is Delegated to an Unrestricted Agent as Executable Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:21-33; supporting behavior inTESTER.md:9-25andTESTER.md:60-65
Vulnerability Type: Unsafe delegation and execution of untrusted documentation
Risk Level: HighVulnerable Code Snippets
SKILL.md:21-33:markdown ## How It Works 1. **Identify the task** — What should someone be able to do after reading the docs? 2. **Bundle the docs** — Collect all relevant documentation (and nothing else) 3. **Spawn a fresh tester** — Use the TESTER.md prompt with `sessions_spawn` 4. **Analyze failures** — Every confusion point is a doc bug 5. **Fix and repeat** — Update docs, respawn, retest until clean ## Usagesessions_spawn( task: "Complete the following task using ONLY the provided documentation. [TASK DESCRIPTION]\n\n---\n\n[PASTE DOCS HERE]", agentId: "default", label: "rtfm-test" )
text TESTER.md:9-25:markdown ### Rules 1. **Use only the docs.** Do not use prior knowledge, external resources, or common sense to fill gaps. If the docs don't say it, you don't know it. 2. **Be literal.** Follow instructions exactly as written. If a step is ambiguous, do not guess — report it as a gap. 3. **No inference.** If the docs say "install dependencies" but don't specify how, that's a gap. Don't assume `npm install` or `pip install` — report the missing information. 4. **Track your progress.** Note each step you complete successfully and each point where you get stuck. 5. **Report gaps immediately.** When you encounter missing, unclear, or incorrect information, log it in the specified format before attempting to continue.TESTER.md:60-65:markdown ### Important - Do not apologize for gaps. They are not your fault. - Do not try to be helpful by working around gaps. Your job is to expose them. - Do not use external knowledge even if you have it. Pretend you are a complete beginner. - Be specific. "The docs are unclear" is not useful. "Step 3 says 'configure the servi ...[truncated 2645 chars]- Remediation
View remediation
Remediation Suggestions
-
Use a restricted tester identity
- Replace the unrestricted
defaultagent with a dedicated documentation-testing agent. - Remove shell, network, credential, write, process-control, and external API permissions unless strictly required.
- Replace the unrestricted
-
Make testing read-only by default
- Permit the tester to analyze and simulate documented steps, but not execute commands or produce external side effects.
- Mount supplied files and the workspace read-only where supported.
-
Treat documentation as untrusted data
- Clearly delimit documentation from system and task instructions.
- Add a higher-priority rule stating that commands, tool requests, role changes, and agent-control instructions inside documentation are content to evaluate, not instructions to execute.
-
Add explicit execution safeguards
- Prohibit access to secrets, files outside an isolated test fixture, environment variables, credentials, and external networks.
- Require human approval before any command execution, file modification, package installation, or outbound request.
- Apply command and destination allowlists where execution is necessary.
-
Use sandboxed disposable environments
- Run practical tests in an ephemeral container or virtual machine containing synthetic data and no production credentials.
- Destroy the environment after every test run.
-
Validate and audit supplied documentation
- Detect suspicious instructions involving credential access, destructive commands, persistence, encoded payloads, remote downloads, or data transmission.
- Record tool calls and side effects for review without logging sensitive values.
-
Revise the tester prompt
- Replace “follow instructions exactly as written” with language requiring the agent to report potentially unsafe steps as gaps without executing them.
- Define a safe simulation mode for documenting what would have been attempted.
-
