Skip to content

Commit

Permalink
Fix commands injection in Github workflow (#9542)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunstar authored Sep 2, 2023
1 parent 2c07375 commit 7e762e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test-bug-run-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
steps:
- name: Test badge test run conditions
id: testCondition
env:
ISSUE_BODY: '${{ github.event.issue.body }}'
run: |
product=$(echo "${{ github.event.issue.body }}" | grep -A2 "Are you experiencing an issue with.*" | tail -n 1)
link=$(echo "${{ github.event.issue.body }}" | grep -A2 "Link to the badge.*" | tail -n 1)
product=$(echo "$ISSUE_BODY" | grep -A2 "Are you experiencing an issue with.*" | tail -n 1)
link=$(echo "$ISSUE_BODY" | grep -A2 "Link to the badge.*" | tail -n 1)
if [[ "$product" == "shields.io" && "$link" == "https://img.shields.io"* ]]; then
echo "runNext=true" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 7e762e7

Please sign in to comment.