Skip to content

Commit 14647f4

Browse files
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>
1 parent 2385f55 commit 14647f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/issue_creation_workflow.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ jobs:
3333
3434
- name: Validate Issue Content
3535
id: validate-issue
36+
env:
37+
ISSUE_BODY: ${{ github.event.issue.body }}
3638
run: |
37-
issue_body="${{ github.event.issue.body }}"
39+
issue_body="$ISSUE_BODY"
3840
if [[ "$issue_body" == *"AI-generated content"* ]] || [[ "$issue_body" == *"existing sites"* ]]; then
3941
echo "Issue body contains disallowed content."
4042
exit 1
4143
fi
4244
4345
- name: Check for Security and Trust
46+
env:
47+
ISSUE_BODY: ${{ github.event.issue.body }}
4448
run: |
45-
issue_body="${{ github.event.issue.body }}"
49+
issue_body="$ISSUE_BODY"
4650
if [[ "$issue_body" != *"security"* ]] || [[ "$issue_body" != *"trust"* ]]; then
4751
echo "Issue does not mention security or trust."
4852
exit 1

0 commit comments

Comments
 (0)