From c757202eb611217b22168d1e31b235f8c1f825bb Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Fri, 14 Aug 2026 02:28:39 +0300 Subject: [PATCH] Fix command injection in review workflow Closes #49 Pass LLM output via a step environment variable and double-quote it in shell commands. This prevents command injection and mitigates the risk of sensitive token leakage. --- .github/workflows/review.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index b5ef070..378f7c1 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -68,4 +68,6 @@ jobs: max-tokens: 7000 - name: Comment - run: gh pr comment $PR_NUMBER --body "${{ steps.inference.outputs.response }}" + env: + RESPONSE: ${{ steps.inference.outputs.response }} + run: gh pr comment $PR_NUMBER --body "$RESPONSE"