From fb8c9dbdbedf325c210c75654d341781719cb3ab Mon Sep 17 00:00:00 2001 From: Ousama Ben Younes Date: Wed, 1 Apr 2026 05:13:53 +0000 Subject: [PATCH] fix: prevent shell injection in summary workflow (#1285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gh issue comment command was interpolating the LLM response via ${{ steps.inference.outputs.response }} directly in the shell, allowing single-quote escaping if the response contained untrusted content. RESPONSE was already declared as an env var but unused — now using it. Closes #1285 Co-Authored-By: Claude --- .github/workflows/summary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/summary.yml b/.github/workflows/summary.yml index 731e3ca5..a4afa9e1 100644 --- a/.github/workflows/summary.yml +++ b/.github/workflows/summary.yml @@ -27,7 +27,7 @@ jobs: - name: Comment with AI summary run: | - gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}' + gh issue comment "$ISSUE_NUMBER" --body "$RESPONSE" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE_NUMBER: ${{ github.event.issue.number }}