From ede503b56beb71c4884be7ded9354da8a659ef12 Mon Sep 17 00:00:00 2001 From: Oliver Koenig Date: Fri, 31 May 2024 15:49:22 +0000 Subject: [PATCH] security Signed-off-by: Oliver Koenig --- .github/workflows/_watchdog.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_watchdog.yaml b/.github/workflows/_watchdog.yaml index 228623495..036a48a8d 100644 --- a/.github/workflows/_watchdog.yaml +++ b/.github/workflows/_watchdog.yaml @@ -11,9 +11,11 @@ jobs: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ci') && - contains('ko3n1g,nouiz,joker-eph,yhtang,terrykong,hemildesai,chaserileyroberts,CliveUnger,DwarKapex,mingxu1067,kocchop,SahilJain314,ashors1,maanug-nv,hmonishN,gspschmid', format('{0},', github.actor)) + contains(fromJSON('["ko3n1g","nouiz","joker-eph","yhtang","terrykong","hemildesai","chaserileyroberts","CliveUnger","DwarKapex","mingxu1067","kocchop","SahilJain314","ashors1","maanug-nv","hmonishN","gspschmid"]'), github.actor) outputs: test_subset: ${{ steps.state.outputs.test_subset }} + env: + message: ${{ github.event.comment.body }} steps: - name: Check out the repository under ${GITHUB_WORKSPACE} uses: actions/checkout@v4 @@ -22,7 +24,7 @@ jobs: shell: bash id: state run: | - test_subsets=$(echo "${{ github.event.comment.body }}" | awk '{$1=$1;print}' | cut -d' ' -f2-) + test_subsets=$(echo "$message" | awk '{$1=$1;print}' | cut -d' ' -f2-) IFS=' ' read -a test_subsets <<< "$test_subsets" valid_test_subsets=$(yq '.on.workflow_dispatch.inputs.TEST_SUBSET.options | join(",")' .github/workflows/ci.yaml) @@ -45,7 +47,7 @@ jobs: shell: bash if: always() run: | - message="${{ github.event.comment.body}} + message="$message --- @@ -117,7 +119,7 @@ jobs: echo "${{ steps.message.outputs.message }}" >> $GITHUB_STEP_SUMMARY # Fetch original commit issue message - message="${{ github.event.comment.body}}" + message="$message" # Remove previous woof-response message=$(awk -F '' '{print $1}' <<< "$message")