enhance: fix a security vulnerability (#36154)

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
pull/36158/head
yellow-shine 2024-09-10 19:09:27 +08:00 committed by GitHub
parent 1d22de140a
commit 2694551757
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -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
@ -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
@ -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