From 1f0c27cfb56686ab3a44adea7da5be49a2a03061 Mon Sep 17 00:00:00 2001 From: FarhanAnjum-opti Date: Wed, 25 Sep 2024 17:47:20 +0600 Subject: [PATCH] [FSSDK-10665] fix: Github Actions YAML files vulnerable to script injections corrected --- .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 9a4e5eb1..7619ca51 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -23,14 +23,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: python