From 1197fb2483aeb3ba6c85c18d9e605663da73304f Mon Sep 17 00:00:00 2001 From: Farhan Anjum Date: Wed, 25 Sep 2024 22:48:39 +0600 Subject: [PATCH] [FSSDK-10665] fix: Github Actions YAML files vulnerable to script injections corrected (#284) --- .github/workflows/integration_test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 1def6cd7..8fd2424c 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -19,14 +19,18 @@ jobs: path: 'home/runner/travisci-tools' ref: 'master' - name: Set SDK branch if PR + env: + HEAD_REF: ${{ github.head_ref }} if: ${{ github.event_name == 'pull_request' }} run: | - echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV + echo "SDK_BRANCH=$HEAD_REF" >> $GITHUB_ENV - name: Set SDK branch if not pull request + env: + REF_NAME: ${{ github.ref_name }} if: ${{ github.event_name != 'pull_request' }} run: | - echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV - echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV + echo "SDK_BRANCH=$REF_NAME" >> $GITHUB_ENV + echo "TRAVIS_BRANCH=$REF_NAME" >> $GITHUB_ENV - name: Trigger build env: SDK: react