Skip to content

Commit

Permalink
enhance: fix a security vulnerability
Browse files Browse the repository at this point in the history
Signed-off-by: Yellow Shine <[email protected]>
  • Loading branch information
yellow-shine committed Sep 10, 2024
1 parent 29ddb10 commit ff2c747
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/check-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
env:
TITLE_PASSED: "T"
ISSUE_TITLE: ${{ github.event.issue.title }}
permissions:
issues: write
timeout-minutes: 20
Expand All @@ -19,7 +20,8 @@ jobs:
- name: Check Issue
shell: bash
run: |
echo Issue title: ${{ github.event.issue.title }}
echo "Issue title: ${ISSUE_TITLE//\"/\\\"}"
cat >> check_title.py << EOF
import re
import sys
Expand All @@ -32,7 +34,7 @@ jobs:
print("TITLE_PASSED=T")
EOF
python3 check_title.py "${{ github.event.issue.title }}" >> "$GITHUB_ENV"
python3 check_title.py "${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_ENV"
cat $GITHUB_ENV
- name: Check env
Expand All @@ -45,4 +47,4 @@ jobs:
with:
issue-number: ${{ github.event.issue.number }}
body: |
The title and description of this issue contains Chinese. Please use English to describe your issue.
The title and description of this issue contains Chinese. Please use English to describe your issue.

0 comments on commit ff2c747

Please sign in to comment.