From 14647f48b30703b033d2f4763cdb1af72f9c5491 Mon Sep 17 00:00:00 2001 From: Ajay Dhangar <99037494+ajay-dhangar@users.noreply.github.com> Date: Sat, 27 Dec 2025 14:41:10 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 1: Code injection Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/issue_creation_workflow.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue_creation_workflow.yml b/.github/workflows/issue_creation_workflow.yml index c1bbaff..0d3786f 100644 --- a/.github/workflows/issue_creation_workflow.yml +++ b/.github/workflows/issue_creation_workflow.yml @@ -33,16 +33,20 @@ jobs: - name: Validate Issue Content id: validate-issue + env: + ISSUE_BODY: ${{ github.event.issue.body }} run: | - issue_body="${{ github.event.issue.body }}" + issue_body="$ISSUE_BODY" if [[ "$issue_body" == *"AI-generated content"* ]] || [[ "$issue_body" == *"existing sites"* ]]; then echo "Issue body contains disallowed content." exit 1 fi - name: Check for Security and Trust + env: + ISSUE_BODY: ${{ github.event.issue.body }} run: | - issue_body="${{ github.event.issue.body }}" + issue_body="$ISSUE_BODY" if [[ "$issue_body" != *"security"* ]] || [[ "$issue_body" != *"trust"* ]]; then echo "Issue does not mention security or trust." exit 1