T01 · Skill Instruction Hijacking
- Location
SKILL.md:3- Finding
Self-Triggering Instructions Hijack Unrelated Document Workflows and Bias Review Results
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This review skill is mostly aligned with document review, but it has unsafe shell handling and broad self-triggering that deserve manual review before installation.
Install only if you are comfortable with the skill storing reviewed documents under ~/.openclaw/workspace/reviews and sending full document text to spawned reviewer models. Before use, remove eval from scripts/cp-output.sh, validate session names and slugs, add explicit confirmation before external reviewer spawning, and add prompt-injection boundaries around reviewed document content.
SKILL.md:3Self-Triggering Instructions Hijack Unrelated Document Workflows and Bias Review Results
scripts/cp-output.sh:57Arbitrary Shell Command Execution Through Eval-Based Destination Expansion
scripts/synthesize.sh:28Unvalidated Session Identifiers Permit Filesystem Path Traversal
references/reviewer-personas.md:3Untrusted Document Instructions Are Inserted Directly Into Reviewer Agent Prompts
The declared description is about orchestrating an adversarial review process for documents. The supplied code chunk does not implement review orchestration at all; it is a post-processing file-management script for copying an already-generated Markdown output file from a review session directory to another location. Its primary purpose is materially different from the declared skill behavior. It also introduces an undeclared capability: filesystem export/copy of output documents. While the script operates within a reviews workspace, that relationship is only incidental and does not match the described core functionality.
There is a material description-to-behavior mismatch. The declared purpose describes an active multi-agent review workflow with reviewer orchestration, redline collection, adjudication support, and self-trigger logic. The actual code chunk is only a setup utility for that workflow: it creates a dated session directory under ~/.openclaw/workspace/reviews, copies the input document, creates redlines/output folders, and generates a positions.md template. These are supporting implementation details, but the chunk by itself does not perform the core capabilities promised in the description. Therefore the supplied code does not accurately represent the declared functionality.
There is a material description-to-behavior mismatch. The script is narrowly focused on post-processing reviewer output files already present in ~/.openclaw/workspace/reviews//redlines. Its primary function is synthesis and formatting of redlines into combined.md. While this supports part of a review workflow ('collects structured redlines'), it does not implement most of the declared core behavior: no agent spawning, no review execution, no adversarial loop orchestration, no complexity scoring, no automatic triggering, and no v2 drafting guidance. The filesystem access is consistent with a review workflow and not independently suspicious, but the declared purpose substantially overstates what this code chunk actually does.
The listed trigger phrases include very generic expressions like 'validate this', 'sanity check this', and 'get a second opinion', which can appear in many ordinary conversations. That makes accidental invocation likely and increases the chance that unrelated user content is swept into the review workflow or filesystem session storage unexpectedly.
The listed trigger phrases include very generic expressions like 'validate this', 'sanity check this', and 'get a second opinion', which can appear in many ordinary conversations. That makes accidental invocation likely and increases the chance that unrelated user content is swept into the review workflow or filesystem session storage unexpectedly.
Referenced artifact was not completely inspected
| 5. Synthesize | `scripts/synthesize.sh <session-dir>` → writes `redlines/combined.md` |
The script uses eval echo "$DESTINATION" on a user-controlled argument, which causes the shell to interpret the destination as code rather than as data. An attacker can supply command substitution or other shell syntax and achieve arbitrary command execution under the privileges of whoever runs the script.
Because the destination path is shell-evaluated before file operations, a crafted destination can execute unintended commands with no warning to the user. In a review automation skill, inputs like destination paths may be copied from untrusted sources or generated by other tools, which makes this more dangerous than a purely local convenience script.
This markdown file includes activation-style guidance for when to use custom reviewers, but the condition 'If none of the above bundles fit exactly' is open-ended and does not define clear limits or exclusions. That ambiguity could lead to overly broad or inconsistent use of the custom path instead of the predefined bundles.
This shell script creates a temporary file under /tmp, writes executable JavaScript into it, runs it with Node, and only removes it afterward. Although subprocess execution is central to the script's purpose, there is no disclosure that it writes and executes a temp script, and cleanup is skipped if the script exits early under set -e before reaching the rm command.
No suspicious patterns detected.