From 95c914e690a957d0a946ccf82f49aedc67ba1ce4 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 14 Apr 2025 00:11:01 +0100 Subject: [PATCH] Potential fix for code scanning alert no. 222: Code injection Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/PR-Demo-Comment-with-react.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PR-Demo-Comment-with-react.yml b/.github/workflows/PR-Demo-Comment-with-react.yml index fb336747f..fb196ca3a 100644 --- a/.github/workflows/PR-Demo-Comment-with-react.yml +++ b/.github/workflows/PR-Demo-Comment-with-react.yml @@ -87,9 +87,10 @@ jobs: - name: Check for security/login flag id: check-security-flag + env: + COMMENT_BODY: ${{ github.event.comment.body }} run: | - COMMENT="${{ github.event.comment.body }}" - if [[ "$COMMENT" == *"security"* ]] || [[ "$COMMENT" == *"login"* ]]; then + if [[ "$COMMENT_BODY" == *"security"* ]] || [[ "$COMMENT_BODY" == *"login"* ]]; then echo "Security flags detected in comment" echo "enable_security=true" >> $GITHUB_OUTPUT else