Skip to content
Snippets Groups Projects
Unverified Commit 7e762e7a authored by Arun's avatar Arun Committed by GitHub
Browse files

Fix commands injection in Github workflow (#9542)

parent 2c073759
No related branches found
No related tags found
No related merge requests found
...@@ -13,9 +13,11 @@ jobs: ...@@ -13,9 +13,11 @@ jobs:
steps: steps:
- name: Test badge test run conditions - name: Test badge test run conditions
id: testCondition id: testCondition
env:
ISSUE_BODY: '${{ github.event.issue.body }}'
run: | run: |
product=$(echo "${{ github.event.issue.body }}" | grep -A2 "Are you experiencing an issue with.*" | tail -n 1) product=$(echo "$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) link=$(echo "$ISSUE_BODY" | grep -A2 "Link to the badge.*" | tail -n 1)
if [[ "$product" == "shields.io" && "$link" == "https://img.shields.io"* ]]; then if [[ "$product" == "shields.io" && "$link" == "https://img.shields.io"* ]]; then
echo "runNext=true" >> "$GITHUB_OUTPUT" echo "runNext=true" >> "$GITHUB_OUTPUT"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment