Opus finding
code-reviewer comment body shell-interpolates LLM-generated text into gh comment
mediumsecuritymedium
- templates/code-reviewer/SKILL.md:47-52
The template shows the comment body as a double-quoted shell string with placeholders for model-generated content ([verdict text], [bullet 1]). Operators following this pattern will substitute LLM output directly into a double-quoted bash string, exposing them to command substitution / variable expansion ($(rm -rf ~), `…`) if the model is prompted to include such tokens — a known prompt-injection class issue (PR titles are operator-controlled and bypass review). gh CLI supports `--body-file -` with stdin or a temp file; the template should model that safer pattern given it is the canonical reference.
Recommendation
Recommend `gh pr comment --body-file body.md` (write the body to a file with no shell expansion) instead of inlined `--body "…"` interpolation.